summaryrefslogtreecommitdiff
path: root/libc/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/Makefile.in5
-rw-r--r--libc/stdio/tempnam.c1
-rw-r--r--libc/stdio/tmpnam.c3
-rw-r--r--libc/stdio/tmpnam_r.c1
4 files changed, 7 insertions, 3 deletions
diff --git a/libc/stdio/Makefile.in b/libc/stdio/Makefile.in
index 1ca2dcff4..ff77bcb6a 100644
--- a/libc/stdio/Makefile.in
+++ b/libc/stdio/Makefile.in
@@ -18,11 +18,14 @@ CSRC := \
setlinebuf.c setvbuf.c ungetc.c \
printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
- tmpfile.c tmpnam.c tmpnam_r.c popen.c tempnam.c ctermid.c
+ tmpfile.c popen.c ctermid.c
ifeq ($(UCLIBC_HAS_LFS),y)
CSRC += fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
endif
+ifeq ($(UCLIBC_SUSV4_LEGACY),y)
+CSRC += tmpnam.c tmpnam_r.c tempnam.c
+endif
# getc -> alias for fgetc
# putc -> alias for fputc
diff --git a/libc/stdio/tempnam.c b/libc/stdio/tempnam.c
index 66c905db8..d2d51daf8 100644
--- a/libc/stdio/tempnam.c
+++ b/libc/stdio/tempnam.c
@@ -42,3 +42,4 @@ tempnam (const char *dir, const char *pfx)
return strdup (buf);
}
+link_warning (tempnam, "the use of OBSOLESCENT `tempnam' is discouraged, use `mkstemp'")
diff --git a/libc/stdio/tmpnam.c b/libc/stdio/tmpnam.c
index 323105ba4..e7359c3bc 100644
--- a/libc/stdio/tmpnam.c
+++ b/libc/stdio/tmpnam.c
@@ -50,5 +50,4 @@ tmpnam (char *s)
return s;
}
-link_warning (tmpnam,
- "the use of `tmpnam' is dangerous, better use `mkstemp'")
+link_warning (tmpnam, "the use of `tmpnam' is dangerous, better use `mkstemp'")
diff --git a/libc/stdio/tmpnam_r.c b/libc/stdio/tmpnam_r.c
index 8f616b273..2b93ae6a0 100644
--- a/libc/stdio/tmpnam_r.c
+++ b/libc/stdio/tmpnam_r.c
@@ -33,3 +33,4 @@ char * tmpnam_r (char *s)
return s;
}
+link_warning (tmpnam_r, "the use of OBSOLESCENT `tmpnam_r' is discouraged, use `mkstemp'")