diff --git a/lib/libc/stdio/gettemp.c b/lib/libc/stdio/gettemp.c index 8154652fe033..ca70f4e24469 100644 --- a/lib/libc/stdio/gettemp.c +++ b/lib/libc/stdio/gettemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: gettemp.c,v 1.7 2002/04/01 13:59:34 bjh21 Exp $ */ +/* $NetBSD: gettemp.c,v 1.8 2002/09/14 04:27:21 thorpej Exp $ */ /* * Copyright (c) 1987, 1993 @@ -33,12 +33,18 @@ * SUCH DAMAGE. */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#if !HAVE_CONFIG_H || !HAVE_MKSTEMP || !HAVE_MKDTEMP + #include #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: gettemp.c,v 1.7 2002/04/01 13:59:34 bjh21 Exp $"); +__RCSID("$NetBSD: gettemp.c,v 1.8 2002/09/14 04:27:21 thorpej Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -53,10 +59,15 @@ __RCSID("$NetBSD: gettemp.c,v 1.7 2002/04/01 13:59:34 bjh21 Exp $"); #include #include +#if HAVE_CONFIG_H +#define GETTEMP gettemp +#else #include "local.h" +#define GETTEMP __gettemp +#endif int -__gettemp(path, doopen, domkdir) +GETTEMP(path, doopen, domkdir) char *path; int *doopen; int domkdir; @@ -158,3 +169,5 @@ __gettemp(path, doopen, domkdir) } /*NOTREACHED*/ } + +#endif /* !HAVE_CONFIG_H || !HAVE_MKSTEMP || !HAVE_MKDTEMP */ diff --git a/lib/libc/stdio/mkdtemp.c b/lib/libc/stdio/mkdtemp.c index 26cebb30d3b1..7b1bbd0915a9 100644 --- a/lib/libc/stdio/mkdtemp.c +++ b/lib/libc/stdio/mkdtemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mkdtemp.c,v 1.5 2002/04/01 13:59:34 bjh21 Exp $ */ +/* $NetBSD: mkdtemp.c,v 1.6 2002/09/14 04:27:21 thorpej Exp $ */ /* * Copyright (c) 1987, 1993 @@ -33,21 +33,32 @@ * SUCH DAMAGE. */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#if !HAVE_CONFIG_H || !HAVE_MKDTEMP + #include #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: mkdtemp.c,v 1.5 2002/04/01 13:59:34 bjh21 Exp $"); +__RCSID("$NetBSD: mkdtemp.c,v 1.6 2002/09/14 04:27:21 thorpej Exp $"); #endif #endif /* LIBC_SCCS and not lint */ +#if HAVE_CONFIG_H +#define GETTEMP gettemp +#else #include #include #include #include #include #include "local.h" +#define GETTEMP __gettemp +#endif char * mkdtemp(path) @@ -55,5 +66,7 @@ mkdtemp(path) { _DIAGASSERT(path != NULL); - return (__gettemp(path, (int *)NULL, 1) ? path : (char *)NULL); + return (GETTEMP(path, (int *)NULL, 1) ? path : (char *)NULL); } + +#endif /* !HAVE_CONFIG_H || !HAVE_MKDTEMP */ diff --git a/lib/libc/stdio/mkstemp.c b/lib/libc/stdio/mkstemp.c index 7ea719c9ef43..6515461c7523 100644 --- a/lib/libc/stdio/mkstemp.c +++ b/lib/libc/stdio/mkstemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mkstemp.c,v 1.4 1999/09/20 04:39:31 lukem Exp $ */ +/* $NetBSD: mkstemp.c,v 1.5 2002/09/14 04:27:21 thorpej Exp $ */ /* * Copyright (c) 1987, 1993 @@ -33,21 +33,32 @@ * SUCH DAMAGE. */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#if !HAVE_CONFIG_H || !HAVE_MKSTEMP + #include #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: mkstemp.c,v 1.4 1999/09/20 04:39:31 lukem Exp $"); +__RCSID("$NetBSD: mkstemp.c,v 1.5 2002/09/14 04:27:21 thorpej Exp $"); #endif #endif /* LIBC_SCCS and not lint */ +#if HAVE_CONFIG_H +#define GETTEMP gettemp +#else #include #include #include #include #include #include "local.h" +#define GETTEMP __gettemp +#endif int mkstemp(path) @@ -57,5 +68,7 @@ mkstemp(path) _DIAGASSERT(path != NULL); - return (__gettemp(path, &fd, 0) ? fd : -1); + return (GETTEMP(path, &fd, 0) ? fd : -1); } + +#endif /* !HAVE_CONFIG_H || !HAVE_MKSTEMP */ diff --git a/usr.bin/mktemp/Makefile b/usr.bin/mktemp/Makefile index 5bd55ae35ea5..d204dca3605b 100644 --- a/usr.bin/mktemp/Makefile +++ b/usr.bin/mktemp/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2002/04/01 13:54:01 bjh21 Exp $ -# From: $FreeBSD: src/usr.bin/mktemp/Makefile,v 1.1 1998/04/14 07:39:56 peter Exp $ +# $NetBSD: Makefile,v 1.5 2002/09/14 04:26:23 thorpej Exp $ PROG= mktemp +.ifndef HOSTPROG .include +.endif diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c index fcd1c684ae12..f3c2ab4daf6d 100644 --- a/usr.bin/mktemp/mktemp.c +++ b/usr.bin/mktemp/mktemp.c @@ -1,4 +1,4 @@ -/* $NetBSD: mktemp.c,v 1.4 2002/04/01 13:54:01 bjh21 Exp $ */ +/* $NetBSD: mktemp.c,v 1.5 2002/09/14 04:26:23 thorpej Exp $ */ /*- * Copyright (c) 1994, 1995, 1996, 1998 Peter Wemm @@ -36,7 +36,11 @@ * more like the OpenBSD version - which was first to publish the interface. */ -#include +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include #include #include #include @@ -44,14 +48,9 @@ #include #include -#ifndef lint -#if 0 -static const char rcsid[] = - "$FreeBSD: src/usr.bin/mktemp/mktemp.c,v 1.2 1998/05/05 06:13:47 charnier Exp $"; -#else -__RCSID("$NetBSD: mktemp.c,v 1.4 2002/04/01 13:54:01 bjh21 Exp $"); -#endif -#endif /* not lint */ +#if defined(__RCSID) && !defined(__lint) +__RCSID("$NetBSD: mktemp.c,v 1.5 2002/09/14 04:26:23 thorpej Exp $"); +#endif /* !__lint */ static void usage __P((void));