diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-01-29 17:48:54 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-01-29 18:31:16 +0100 |
commit | 7c721d31e4b7a0bdf6f803b8e7c38996bf60b59f (patch) | |
tree | 217d8054855c8c3b57c1d9ac24d83641aa566253 /libc | |
parent | fba639dcdcc2f3fede71e8bcd1a1a525a7f57d61 (diff) |
tmpnam, tempnam are obsolete in SUSV4
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdio/Makefile.in | 5 | ||||
-rw-r--r-- | libc/stdio/tempnam.c | 1 | ||||
-rw-r--r-- | libc/stdio/tmpnam.c | 3 | ||||
-rw-r--r-- | libc/stdio/tmpnam_r.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/arm/aeabi_lcsts.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/stdio_lim.h | 4 |
6 files changed, 12 insertions, 4 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'") diff --git a/libc/sysdeps/linux/arm/aeabi_lcsts.c b/libc/sysdeps/linux/arm/aeabi_lcsts.c index 0c620d4fe..e1e539093 100644 --- a/libc/sysdeps/linux/arm/aeabi_lcsts.c +++ b/libc/sysdeps/linux/arm/aeabi_lcsts.c @@ -79,7 +79,9 @@ eabi_constant (BUFSIZ); eabi_constant (FOPEN_MAX); eabi_constant (TMP_MAX); eabi_constant (FILENAME_MAX); +#ifdef __UCLIBC_SUSV4_LEGACY__ eabi_constant (L_tmpnam); +#endif FILE *__aeabi_stdin attribute_hidden; FILE *__aeabi_stdout attribute_hidden; diff --git a/libc/sysdeps/linux/common/bits/stdio_lim.h b/libc/sysdeps/linux/common/bits/stdio_lim.h index c35ee601b..2c0b36fbd 100644 --- a/libc/sysdeps/linux/common/bits/stdio_lim.h +++ b/libc/sysdeps/linux/common/bits/stdio_lim.h @@ -21,7 +21,9 @@ #endif #ifdef _STDIO_H -# define L_tmpnam 20 +# ifdef __UCLIBC_SUSV4_LEGACY__ +# define L_tmpnam 20 +# endif # define TMP_MAX 238328 # define FILENAME_MAX 4095 |