Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/lib/libc/stdio Pull up revision 1.6 (requested by thorp...
details: https://anonhg.NetBSD.org/src/rev/9b0d4481c131
branches: netbsd-1-6
changeset: 529585:9b0d4481c131
user: he <he%NetBSD.org@localhost>
date: Sat Nov 30 14:58:34 2002 +0000
description:
Pull up revision 1.6 (requested by thorpej in ticket #806):
Allow mktemp to build as a host tool.
diffstat:
lib/libc/stdio/mkdtemp.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diffs (52 lines):
diff -r 4554e3bf91a2 -r 9b0d4481c131 lib/libc/stdio/mkdtemp.c
--- a/lib/libc/stdio/mkdtemp.c Sat Nov 30 14:58:10 2002 +0000
+++ b/lib/libc/stdio/mkdtemp.c Sat Nov 30 14:58:34 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkdtemp.c,v 1.5 2002/04/01 13:59:34 bjh21 Exp $ */
+/* $NetBSD: mkdtemp.c,v 1.5.2.1 2002/11/30 14:58:34 he 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 <sys/cdefs.h>
#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.5.2.1 2002/11/30 14:58:34 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#if HAVE_CONFIG_H
+#define GETTEMP gettemp
+#else
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "local.h"
+#define GETTEMP __gettemp
+#endif
char *
mkdtemp(path)
@@ -55,5 +66,7 @@
{
_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 */
Home |
Main Index |
Thread Index |
Old Index