From a7657f3012765b9c2d80c7387d487fc5156d3bc2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 28 Apr 2016 22:01:04 +0000 Subject: Fix stdio.h namespace for pre-threads POSIX (bug 20014). stdio.h declares flockfile, ftrylockfile, funlockfile, getc_unlocked, getchar_unlocked, putc_unlocked and putchar_unlocked if __USE_POSIX, with comments "These are defined in POSIX.1:1996.". But __USE_POSIX is actually POSIX.1:1990, and these functions should not be declared for 1990 / 1992 / 1993 POSIX, XPG3 or XPG4. This patch fixes stdio.h to use __USE_POSIX199506 instead for those conditionals, as that is the correct conditional for the version of POSIX that introduced threads, and with threads those functions. Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). [BZ #20014] * libio/stdio.h (getc_unlocked): Declare if [__USE_POSIX199506], not [__USE_POSIX]. (getchar_unlocked): Likewise. (putc_unlocked): Likewise. (putchar_unlocked): Likewise. (flockfile): Likewise. (ftrylockfile): Likewise. (funlockfile): Likewise. * conform/Makefile (test-xfail-XPG3/stdio.h/conform): Remove variable. (test-xfail-XPG4/stdio.h/conform): Likewise. --- conform/Makefile | 2 -- 1 file changed, 2 deletions(-) (limited to 'conform/Makefile') diff --git a/conform/Makefile b/conform/Makefile index 06c4ff3..f2aa177 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -169,7 +169,6 @@ test-xfail-XPG3/limits.h/conform = yes test-xfail-XPG3/pwd.h/conform = yes test-xfail-XPG3/search.h/conform = yes test-xfail-XPG3/signal.h/conform = yes -test-xfail-XPG3/stdio.h/conform = yes test-xfail-XPG3/stdlib.h/conform = yes test-xfail-XPG3/string.h/conform = yes test-xfail-XPG3/sys/stat.h/conform = yes @@ -183,7 +182,6 @@ test-xfail-XPG4/fcntl.h/conform = yes test-xfail-XPG4/netdb.h/conform = yes test-xfail-XPG4/netinet/in.h/conform = yes test-xfail-XPG4/signal.h/conform = yes -test-xfail-XPG4/stdio.h/conform = yes test-xfail-XPG4/stdlib.h/conform = yes test-xfail-XPG4/sys/stat.h/conform = yes test-xfail-XPG4/sys/time.h/conform = yes -- cgit v1.1