aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/tmpfile.c6
-rw-r--r--sysdeps/generic/tmpfile64.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/sysdeps/generic/tmpfile.c b/sysdeps/generic/tmpfile.c
index 9b60dbb43d..051cb79abd 100644
--- a/sysdeps/generic/tmpfile.c
+++ b/sysdeps/generic/tmpfile.c
@@ -26,6 +26,10 @@
# define tmpfile __new_tmpfile
#endif
+#ifndef GEN_THIS
+# define GEN_THIS __GT_FILE
+#endif
+
/* This returns a new stream opened on a temporary file (generated
by tmpnam). The file is opened with mode "w+b" (binary read/write).
If we couldn't generate a unique filename or the file couldn't
@@ -39,7 +43,7 @@ tmpfile (void)
if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
return NULL;
- fd = __gen_tempname (buf, __GT_FILE);
+ fd = __gen_tempname (buf, GEN_THIS);
if (fd < 0)
return NULL;
diff --git a/sysdeps/generic/tmpfile64.c b/sysdeps/generic/tmpfile64.c
new file mode 100644
index 0000000000..adce634556
--- /dev/null
+++ b/sysdeps/generic/tmpfile64.c
@@ -0,0 +1,3 @@
+#define GEN_THIS __GT_BIGFILE
+#define tmpfile tmpfile64
+#include "tmpfile.c"