summaryrefslogtreecommitdiff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2016-12-06 10:14:42 -0500
committerZack Weinberg <zackw@panix.com>2016-12-08 15:45:33 -0500
commitc03073774f915fe7841c2b551fe304544143470f (patch)
tree724d0dff62918aba70b4e4fc17c80f35f2e6eafa /include/libc-symbols.h
parent3d6bfcace17a479c2e006a33567af80e6070583f (diff)
Make _REENTRANT and _THREAD_SAFE aliases for _POSIX_C_SOURCE=199506L.
For many years, the only effect of these macros has been to make unistd.h declare getlogin_r. _POSIX_C_SOURCE >= 199506L also causes this function to be declared. However, people who don't carefully read all the headers might be confused into thinking they need to define _REENTRANT for any threaded code (as was indeed the case a long time ago). Therefore, remove __USE_REENTRANT, and make _REENTRANT and _THREAD_SAFE into synonyms for _POSIX_C_SOURCE=199506L. This will only affect programs that don't select a higher conformance level some other way. For instance, -std=c89 -D_REENTRANT will see a change in visible declarations, but -std=c99 -D_POSIX_C_SOURCE=200809L -D_REENTRANT won't, and -D_REENTRANT all by itself also won't, because _DEFAULT_SOURCE implies _POSIX_C_SOURCE > 199506. * include/features.h: Remove __USE_REENTRANT. Treat _REENTRANT and _THREAD_SAFE the same as _POSIX_C_SOURCE=199506L, if a higher POSIX conformance level has not been selected by other macros. * NEWS, manual/creature.texi: Document this change. * posix/unistd.h, posix/bits/unistd.h: Don't check __USE_REENTRANT. * include/libc-symbols.h: Don't define _REENTRANT. * scripts/check-installed-headers.sh: Don't undefine _REENTRANT.
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 1c91f2e6a3..4238d7930b 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -52,8 +52,6 @@
/* Enable declarations of GNU extensions, since we are compiling them. */
#define _GNU_SOURCE 1
-/* And we also need the data for the reentrant functions. */
-#define _REENTRANT 1
#include <config.h>