Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio use more Xs for filename templates.
details: https://anonhg.NetBSD.org/src/rev/fdd76ddfde43
branches: trunk
changeset: 535108:fdd76ddfde43
user: yamt <yamt%NetBSD.org@localhost>
date: Sat Aug 10 16:28:51 2002 +0000
description:
use more Xs for filename templates.
from OpenBSD.
diffstat:
lib/libc/stdio/tempnam.c | 12 ++++++------
lib/libc/stdio/tmpfile.c | 6 +++---
lib/libc/stdio/tmpnam.c | 6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)
diffs (103 lines):
diff -r 1818a2f234ff -r fdd76ddfde43 lib/libc/stdio/tempnam.c
--- a/lib/libc/stdio/tempnam.c Sat Aug 10 16:28:49 2002 +0000
+++ b/lib/libc/stdio/tempnam.c Sat Aug 10 16:28:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tempnam.c,v 1.14 2001/06/21 21:17:10 christos Exp $ */
+/* $NetBSD: tempnam.c,v 1.15 2002/08/10 16:28:51 yamt Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tempnam.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: tempnam.c,v 1.14 2001/06/21 21:17:10 christos Exp $");
+__RCSID("$NetBSD: tempnam.c,v 1.15 2002/08/10 16:28:51 yamt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -69,26 +69,26 @@
pfx = "tmp.";
if ((f = getenv("TMPDIR")) != NULL) {
- (void)snprintf(name, (size_t)MAXPATHLEN, "%s%s%sXXXXXXX", f,
+ (void)snprintf(name, (size_t)MAXPATHLEN, "%s%s%sXXXXXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if ((f = _mktemp(name)) != NULL)
return(f);
}
if ((/* LINTED */f = (char *)dir) != NULL) {
- (void)snprintf(name, (size_t)MAXPATHLEN, "%s%s%sXXXXXXX", f,
+ (void)snprintf(name, (size_t)MAXPATHLEN, "%s%s%sXXXXXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if ((f = _mktemp(name)) != NULL)
return(f);
}
f = P_tmpdir;
- (void)snprintf(name, (size_t)MAXPATHLEN, "%s%sXXXXXXX", f, pfx);
+ (void)snprintf(name, (size_t)MAXPATHLEN, "%s%sXXXXXXXXXX", f, pfx);
if ((f = _mktemp(name)) != NULL)
return(f);
f = _PATH_TMP;
- (void)snprintf(name, (size_t)MAXPATHLEN, "%s%sXXXXXXX", f, pfx);
+ (void)snprintf(name, (size_t)MAXPATHLEN, "%s%sXXXXXXXXXX", f, pfx);
if ((f = _mktemp(name)) != NULL)
return(f);
diff -r 1818a2f234ff -r fdd76ddfde43 lib/libc/stdio/tmpfile.c
--- a/lib/libc/stdio/tmpfile.c Sat Aug 10 16:28:49 2002 +0000
+++ b/lib/libc/stdio/tmpfile.c Sat Aug 10 16:28:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfile.c,v 1.8 1998/10/13 14:07:04 kleink Exp $ */
+/* $NetBSD: tmpfile.c,v 1.9 2002/08/10 16:28:51 yamt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tmpfile.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: tmpfile.c,v 1.8 1998/10/13 14:07:04 kleink Exp $");
+__RCSID("$NetBSD: tmpfile.c,v 1.9 2002/08/10 16:28:51 yamt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -61,7 +61,7 @@
sigset_t set, oset;
FILE *fp;
int fd, sverrno;
-#define TRAILER "tmp.XXXXXX"
+#define TRAILER "tmp.XXXXXXXXXX"
char buf[sizeof(_PATH_TMP) + sizeof(TRAILER)];
(void)memcpy(buf, _PATH_TMP, sizeof(_PATH_TMP) - 1);
diff -r 1818a2f234ff -r fdd76ddfde43 lib/libc/stdio/tmpnam.c
--- a/lib/libc/stdio/tmpnam.c Sat Aug 10 16:28:49 2002 +0000
+++ b/lib/libc/stdio/tmpnam.c Sat Aug 10 16:28:51 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpnam.c,v 1.11 1998/10/13 14:19:21 kleink Exp $ */
+/* $NetBSD: tmpnam.c,v 1.12 2002/08/10 16:28:51 yamt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tmpnam.c 8.3 (Berkeley) 3/28/94";
#else
-__RCSID("$NetBSD: tmpnam.c,v 1.11 1998/10/13 14:19:21 kleink Exp $");
+__RCSID("$NetBSD: tmpnam.c,v 1.12 2002/08/10 16:28:51 yamt Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -63,7 +63,7 @@
if (s == NULL)
s = buf;
- (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXX", P_tmpdir, tmpcount);
+ (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXXXXXX", P_tmpdir, tmpcount);
++tmpcount;
return (_mktemp(s));
}
Home |
Main Index |
Thread Index |
Old Index