Ulrich Drepper wrote:
> 
> [EMAIL PROTECTED] (Bodo Moeller) writes:
> 
> > Turns out that the Linux-specific parts of glibc 2.1 doesn't pay
> > attention to the standards in the first place and _always_ defines
> > errno to be that macro.  So, unless (or until) there are also correct
> > versions of the library, -D_REENTRANT is not needed on Linux with
> > glibc.
> 
> Somebody who has no clue about these things shouldn't make such
> comments.  Errno is explicitly *always* allowed to be a macro and
> _REENTRANT is not defined in any standard.  So, everything you wrote
> is completely wrong.
> 

Excuse me for possibly being clueless on this. Observing openssl
libraries linked against glibc-2.0.7 I see the following:
compiling with -D_REENTRANT -DTHREADS generates symbol U
__errno_location
compiling without these generates symbol U errno

The definition of __errno_location is in libc.so.6 as as 'weak'
symbol, and also in libpthread.so.0 as an 'absolute' symbol.
Therefore linking applications with openssl without -lpthread
will take the definition in libc, but -lpthread will overrride
this (with the thread-specific value?). 

I don't have glibc 2.1 around, so I can't comment on that but for
normal linux compilations I'd say making thread-safe libraries
should be the default. That is, *with* -D_REENTRANT.
-- 
Niels Poppe - org.net bv <[EMAIL PROTECTED]>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to