This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] Deprecate _REENTRANT and _THREAD_SAFE.


On 12/06/2016 11:43 AM, Zack Weinberg wrote:
> On 12/06/2016 10:36 AM, Florian Weimer wrote:
>> On 12/06/2016 04:22 PM, Zack Weinberg wrote:
>>> 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).
>>
>> You should get rid of the internal #define and #undef of _REENTRANT, too.
> 
> Do you mean the ones in libc-symbols.h and check-installed-headers.sh?
> Those are the only ones I see grepping.
> 
> This updated patch takes care of that and also the discussion in
> creature.texi.  (creature.texi needs a thorough overhaul, but let's not
> worry about that now.)  Also, it's been tested on x86-64-linux.

>From a high level I support _anything_ that gets rid of _REENTRANT which is
by itself a conceptually flawed name [1].

The second version which fixes libc-symbols.h and check-installed-headers.sh
looks better, but I agree with Jopseh and Florian that it should not warn
for the variety of reasons already listed (compiler defaults being the
most important).

It looks like you have consensus on the change done by v2 patch but with
the warning disabled?

-- 
Cheers,
Carlos.

[1] https://sourceware.org/ml/libc-alpha/2014-12/msg00954.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]