From 7c721d31e4b7a0bdf6f803b8e7c38996bf60b59f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 29 Jan 2012 17:48:54 +0100 Subject: tmpnam, tempnam are obsolete in SUSV4 Signed-off-by: Bernhard Reutner-Fischer --- libc/stdio/Makefile.in | 5 ++++- libc/stdio/tempnam.c | 1 + libc/stdio/tmpnam.c | 3 +-- libc/stdio/tmpnam_r.c | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'libc/stdio') 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'") -- cgit v1.2.3