[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _REENTRANT and _THREAD_SAFE
From: |
Joseph Myers |
Subject: |
Re: _REENTRANT and _THREAD_SAFE |
Date: |
Mon, 27 Feb 2017 22:41:57 +0000 |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
On Mon, 27 Feb 2017, Bruno Haible wrote:
> Does it mean that _REENTRANT and _THREAD_SAFE now prevent some symbols
> from being declared?
No.
The effect of those macros used to be: declare getlogin_r. Because
getlogin_r is part of POSIX.1 (199506) and the default POSIX version in
the glibc headers is 200809, this had no effect (getlogin_r was already
declared) unless you defined _POSIX_SOURCE, or defined _POSIX_C_SOURCE to
a value smaller than 199506, or defined another feature test macro for
another such old standard version without getlogin_r, or used -ansi /
-std=c89 / -std=c99 / -std=c11 without defining any feature test macro
implying a 199506 or later value for _POSIX_C_SOURCE.
Now, the effect is to declare all POSIX.1 (199506) symbols rather than
just getlogin_r. They still have no effect unless you define feature test
macros for an older standard, or select an ISO C conformance mode without
defining feature test macros for a newer standard. They still do not
cause any functions not to be declared.
--
Joseph S. Myers
address@hidden