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.8 (requested by thorp...



details:   https://anonhg.NetBSD.org/src/rev/4554e3bf91a2
branches:  netbsd-1-6
changeset: 529584:4554e3bf91a2
user:      he <he%NetBSD.org@localhost>
date:      Sat Nov 30 14:58:10 2002 +0000

description:
Pull up revision 1.8 (requested by thorpej in ticket #806):
  Allow mktemp to build as a host tool.

diffstat:

 lib/libc/stdio/gettemp.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r e508b8e43593 -r 4554e3bf91a2 lib/libc/stdio/gettemp.c
--- a/lib/libc/stdio/gettemp.c  Sat Nov 30 14:55:18 2002 +0000
+++ b/lib/libc/stdio/gettemp.c  Sat Nov 30 14:58:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gettemp.c,v 1.7 2002/04/01 13:59:34 bjh21 Exp $        */
+/*     $NetBSD: gettemp.c,v 1.7.2.1 2002/11/30 14:58:10 he 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 <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: gettemp.c,v 1.7 2002/04/01 13:59:34 bjh21 Exp $");
+__RCSID("$NetBSD: gettemp.c,v 1.7.2.1 2002/11/30 14:58:10 he Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -53,10 +59,15 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#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 @@
        }
        /*NOTREACHED*/
 }
+
+#endif /* !HAVE_CONFIG_H || !HAVE_MKSTEMP || !HAVE_MKDTEMP */



Home | Main Index | Thread Index | Old Index