summaryrefslogtreecommitdiff
path: root/libc/stdio/tmpnam_r.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-31 04:17:44 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-31 04:17:44 +0000
commitcdb29e3ea6c22f0c0358f0414e3ddb615b1c394f (patch)
tree2c867e60effb9df51b1a0fa615bb55b398561341 /libc/stdio/tmpnam_r.c
parent9116dff92e5b362011431f073fe6aa98327be254 (diff)
Rework __gen_tempname() to better match glibc, and add mkstemp64(),
which is needed for busybox ash when using largefile support. -Erik
Diffstat (limited to 'libc/stdio/tmpnam_r.c')
-rw-r--r--libc/stdio/tmpnam_r.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libc/stdio/tmpnam_r.c b/libc/stdio/tmpnam_r.c
index 630d96eb3..6309aac06 100644
--- a/libc/stdio/tmpnam_r.c
+++ b/libc/stdio/tmpnam_r.c
@@ -18,10 +18,6 @@
#include <stdio.h>
-extern int __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
- int try_tmpdir);
-extern int __gen_tempname (char *tmpl, int openit);
-
/* Generate a unique filename in P_tmpdir. If S is NULL return NULL.
This makes this function thread safe. */
char * tmpnam_r (char *s)
@@ -31,7 +27,7 @@ char * tmpnam_r (char *s)
if (__path_search (s, L_tmpnam, NULL, NULL, 0))
return NULL;
- if (__gen_tempname (s, 0))
+ if (__gen_tempname (s, __GT_NOCREATE))
return NULL;
return s;