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.
- From: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: mtk dot manpages at gmail dot com, libc-alpha <libc-alpha at sourceware dot org>
- Date: Sat, 10 Dec 2016 15:23:08 +0100
- Subject: Re: [RFC PATCH] Deprecate _REENTRANT and _THREAD_SAFE.
- Authentication-results: sourceware.org; auth=none
- References: <20161206152204.2064-1-zackw@panix.com> <CALxWeYozGxUHi8wPhHd4fgx=DPtg4UG0UC2Znq7HfOd2JJxBmA@mail.gmail.com> <CAKCAbMh0e6L+bT80v4E=q9Q537GxBk3ppWMhibnsrmb6sfPCbA@mail.gmail.com> <5602e372-58b6-59ab-fe2e-cd2801cdfb7d@gmail.com> <CAKCAbMjDnM7SBBaiNn1=9VRnF5sOU7ivEHBKOUTWu2S+PbBKwA@mail.gmail.com> <cf5ed055-0f69-175d-690a-877ecdc44bc4@gmail.com> <CAKCAbMg6A=Y0viePELOmfCX-eS95AhOU4FUHy1B=u4_AUYaPhg@mail.gmail.com>
On 12/10/2016 02:56 PM, Zack Weinberg wrote:
> On Sat, Dec 10, 2016 at 7:00 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@gmail.com> wrote:
>> By now, the text reads:
>>
>> _REENTRANT
>> Historically, on various C libraries it was necessary to
>> define this macro in all multithreaded code. (Some C
>> libraries may still require this.) In glibc, this macro
>> also exposed definitions of certain reentrant functions.
>>
>> However, glibc has been thread-safe by default for many
>> years; since glibc 2.3, the only effect of defining _REEN‐
>> TRANT has been to enable one or two of the same declara‐
>> tions that are also enabled by defining _POSIX_C_SOURCE
>> with a value of 199606L or greater.
>>
>> _REENTRANT is now obsolete. In glibc 2.25 and later,
>> defining _REENTRANT is equivalent to defining
>> _POSIX_C_SOURCE with the value 199606L. If a higher POSIX
>> conformance level is selected by any other means (such as
>> _POSIX_C_SOURCE itself, _XOPEN_SOURCE, _DEFAULT_SOURCE, or
>> _GNU_SOURCE), then defining _REENTRANT has no effect.
>>
>> This macro is automatically defined if one compiles with
>> cc -pthread.
>>
>> Seem okay?
>
> Looks good to me.
Thanks, Zack. Merged to master and pushed to public Git now.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/