[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Request official mandate for -D_REENTRANT



On 23 Jan 1997, Mark Eichin wrote:
> > "maintonly" bug reports for all libraries not already built with
> > -D_REENTRANT.
> 
> Does -D_REENTRANT effect header files? ie. should libdb be built with
> that flag even though it doesn't have any code of it's own that
> recognizes it? 

Yes!  Even if a library doesn't support threads itself, it still needs
to be compiled with -D_REENTRANT so that it picks up the threaded
portions of libc.  For example, errno is handled differently depending
on whether or not -D_REENTRANT is used.  When -D_REENTRANT is not
used, errno is simply a global integer.  When -D_REENTRANT is used,
errno is a macro which evaluates to the lvalue of a per-thread
integer.  So if libdb uses errno (pretty likely) and isn't compiled
with -D_REENTRANT, it can't safely be used by a threaded application.

David
--
David Engel                        ODS Networks
david@sw.ods.com                   1001 E. Arapaho Road
(972) 234-6400                     Richardson, TX  75081


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: