-D_REENTRANT and debian policy
On Wed, Jan 31, 2007 at 08:32:08PM -0800, Michael Kerrisk wrote:
> Justin Pryzby wrote:
> > On Sun, Jan 28, 2007 at 11:27:28AM -0800, Michael Kerrisk wrote:
> >> Justin Pryzby wrote:
> >>> On Wed, Jan 24, 2007 at 03:47:35PM -0500, Justin Pryzby wrote:
> >>>> tag 408304 patch
> >>>> thanks
> >>> I note that the following FTM from features.h are not described by f_t_m.7:
> >>>
> >>> _LARGEFILE_SOURCE
> >>> _REENTRANT
> >>> _THREAD_SAFE
> >>> _FORTIFY_SOURCE
> >> I have added text for 2.44 that describes all of the above except
> >> _LARGEFILE_SOURCE. For the latter, there seems to be only one place it is
> >> used, and I haven't got clear about it is needed (or if it ever really is).
> >>
> >> _REENTRANT
> >> Defining this macro exposes definitions of certain
> >> reentrant functions. Avoid direct use of this
> >> macro; use cc -pthread instead.
> > Could you elaborate on the difference between the two? Debian policy presently
> > requires _REENTRANT.
>
> IIRC, cc -pthread == cc -D_REENTRANT -lpthread
>
> Why does Debian require _REENTRANT?
It's just required for library comipilation, presumably so that threaded
applications don't break just because a conforming but not thread safe
implementation of some library funtion was used, effectively making the library
thread unsafe.
Justin
Reply to: