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 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.

zw


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