This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] Deprecate _REENTRANT and _THREAD_SAFE.
On Wed, Dec 7, 2016 at 4:06 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 12/06/2016 05:43 PM, Zack Weinberg wrote:
>>
>> Do you mean the ones in libc-symbols.h and check-installed-headers.sh?
>> Those are the only ones I see grepping.
>
> Right, those are the ones I noticed.
>
> I agree that we probably have to remove the warning.
For clarity, both iterations of the patch warn *only* for cases where
_REENTRANT actually does something, which is only when, without it, we
would have activated a conformance level lower than
_POSIX_C_SOURCE=199506L. This should be very rare. In particular,
-D_REENTRANT by itself won't warn. That was just me thinking out
loud.
I can see a case for not warning at all, though, what with -pthread
doing -D_REENTRANT. -std=c89 -pthread without additional options is
probably wrong -- the code probably *wants* POSIX.1-2001 or higher
even if it doesn't know to ask for it -- but I can see it happening.
What do you think?
zw