On 4/11/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
> 
> Am 11.04.2005 um 05:05 schrieb Stephen Deasey:
> 
> > I guess this is an OSX problem?  While looking at the configure tests,
> > I noticed that gethostbyname_r etc. are not used on Linux, even though
> > they're available.  The standard call is thread safe, but only because
> > glibc puts a lock around everything.
> >
> > I wonder if for performance the *_r variants should always be
> > preferred...?
> >
> 
> Actually, this happens only on Solaris 2.6 (yes, we still must support
> 2.6). No, the performance isn't the main reason. The main reason is
> other code using the non-mt-code. We can't just lock the call ourselves.
> We could do that if we were sitting in the libc, but we are not.
> 
> Besides, this is/was a bug.


GETHOSTBYADDR_R isn't set when building on Linux, even though that
function is available.  The non-_r version is thread safe, as glibc
does the locking.  It will just serialize all calls and be slower.

It completely doesn't matter because getnameinfo is used in preference...  :-)

Reply via email to