summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-04-01 11:57:37 +0000
committerEric Andersen <andersen@codepoet.org>2002-04-01 11:57:37 +0000
commit3d9e386284bcc1e3599046d348a4b905ce5005c4 (patch)
tree2a385debe803b7299cda60eab493ecdbb467a467 /libc
parent193d725142ec7f946088890e0654a11db0c3c6c8 (diff)
Remove function declartions from include/features.h, create
a separate header file for those, and fixup references. -Erik
Diffstat (limited to 'libc')
-rw-r--r--libc/misc/internals/tempname.c1
-rw-r--r--libc/misc/internals/tempname.h16
-rw-r--r--libc/stdio/tempnam.c1
-rw-r--r--libc/stdio/tmpfile.c1
-rw-r--r--libc/stdio/tmpnam.c1
-rw-r--r--libc/stdio/tmpnam_r.c1
-rw-r--r--libc/stdlib/mkstemp.c1
-rw-r--r--libc/stdlib/mkstemp64.c1
-rw-r--r--libc/stdlib/mktemp.c1
9 files changed, 24 insertions, 0 deletions
diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c
index 427c16cb5..573305162 100644
--- a/libc/misc/internals/tempname.c
+++ b/libc/misc/internals/tempname.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include "tempname.h"
/* Return nonzero if DIR is an existent directory. */
diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h
new file mode 100644
index 000000000..f068727a7
--- /dev/null
+++ b/libc/misc/internals/tempname.h
@@ -0,0 +1,16 @@
+#ifndef __TEMPNAME_H__
+#define __TEMPNAME_H__
+
+#define __need_size_t
+#include <stddef.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 __kind);
+
+/* The __kind argument to __gen_tempname may be one of: */
+#define __GT_FILE 0 /* create a file */
+#define __GT_BIGFILE 1 /* create a file, using open64 */
+#define __GT_DIR 2 /* create a directory */
+#define __GT_NOCREATE 3 /* just find a name not currently in use */
+
+#endif
diff --git a/libc/stdio/tempnam.c b/libc/stdio/tempnam.c
index 109276de7..a11f82b5d 100644
--- a/libc/stdio/tempnam.c
+++ b/libc/stdio/tempnam.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
+#include "../misc/internals/tempname.h"
/* Generate a unique temporary filename using up to five characters of PFX
if it is not NULL. The directory to put this file in is searched for
diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c
index f19c497a4..d7940b139 100644
--- a/libc/stdio/tmpfile.c
+++ b/libc/stdio/tmpfile.c
@@ -19,6 +19,7 @@
#include <features.h>
#include <stdio.h>
#include <unistd.h>
+#include "../misc/internals/tempname.h"
/* This returns a new stream opened on a temporary file (generated
by tmpnam). The file is opened with mode "w+b" (binary read/write).
diff --git a/libc/stdio/tmpnam.c b/libc/stdio/tmpnam.c
index 23cba46ed..802c54498 100644
--- a/libc/stdio/tmpnam.c
+++ b/libc/stdio/tmpnam.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
+#include "../misc/internals/tempname.h"
static char tmpnam_buffer[L_tmpnam];
diff --git a/libc/stdio/tmpnam_r.c b/libc/stdio/tmpnam_r.c
index 6309aac06..eec589e39 100644
--- a/libc/stdio/tmpnam_r.c
+++ b/libc/stdio/tmpnam_r.c
@@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+#include "../misc/internals/tempname.h"
/* Generate a unique filename in P_tmpdir. If S is NULL return NULL.
This makes this function thread safe. */
diff --git a/libc/stdlib/mkstemp.c b/libc/stdlib/mkstemp.c
index de5d557f4..c569ceaf5 100644
--- a/libc/stdlib/mkstemp.c
+++ b/libc/stdlib/mkstemp.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
diff --git a/libc/stdlib/mkstemp64.c b/libc/stdlib/mkstemp64.c
index 5762da79d..02a03f00e 100644
--- a/libc/stdlib/mkstemp64.c
+++ b/libc/stdlib/mkstemp64.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
diff --git a/libc/stdlib/mktemp.c b/libc/stdlib/mktemp.c
index 4faa3e671..57f9398b3 100644
--- a/libc/stdlib/mktemp.c
+++ b/libc/stdlib/mktemp.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "../misc/internals/tempname.h"
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";