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 Fri, Dec 9, 2016 at 5:32 AM, Michael Kerrisk (man-pages)
<mtk.manpages@gmail.com> wrote:
>
> I should perhaps have been clearer. By "queued" I meant the changes,
> were not yet in "master"; just in a private branch.

Oh, OK.  Sorry for the misunderstanding.

> And, by now, your patch has hit the repo, so I suppose we're good
> for adding this documentation to nam-pages "master", right?

Yes, with two more notes ...

>>> +Historically,
>>> +defining this macro exposed definitions of certain reentrant functions.
>>
>> Historically, it was necessary to define this macro in all
>> multithreaded code.
>> Some C libraries may still require this.
>
> Okay. I did a little code spelunking and found the following:
...
> In other words, the window of time where _REENTRANT and _THREAD_SAFE
> did anything much in glibc was quite short, IIUC.

This is me not being clear enough.  I didn't mean to imply that this
was historically necessary _with glibc_, but that there did once exist
C libraries where it was necessary.  The ones I remember were
proprietary Unix vendor libcs from the mid-1990s.  You would get
completely unlocked stdio without _REENTRANT.

What I would like the text to indicate, is that this is not necessary
with current glibc but it might still be necessary for portable code,
and we don't know for sure which platforms are affected.  Maybe this
is clear enough as is? I'm not sure.

>>> +This macro is now deprecated; since glibc 2.25,
>>> +defining it has the same effect as defining
>>> +.BR _POSIX_C_SOURCE
>>> +with a value of 199606L or greater.
>>
>> In glibc 2.25 and later,
>> .B _REENTRANT
>> is deprecated.

And I've decided that glibc's not going to call these macros
"deprecated".  creature.texi says "obsolete", NEWS says "these
nonstandard feature selection macros are now compatibility synonyms
for _POSIX_C_SOURCE=199506L", and there are no warnings for their use.
Would you mind adjusting the wording so that it's consistent with
that?

Thanks,
zw


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