Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date
Msg-id 200309021520.h82FKEM12100@candle.pha.pa.us
Whole thread Raw
In response to Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Larry Rosenman <ler@lerctr.org>)
Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-hackers
Peter Eisentraut wrote:
> Lee Kindness writes:
> 
> > You don't... and you simply shouldn't care. If there is a_r version
> > available then we should use it - even if the plain version is "safe".
> 
> The problem with this is that the automatic determination (in configure)
> whether there is a xxx_r()  version is, in general, fragile.  We cannot
> rely on configure saying that xxx_r() doesn't exist, so the plain xxx()
> should be good enough.  Else, we'd be shipping claimed-to-be-thread-safe
> libraries that might trigger bugs that will be hard to track down.
> 
> I don't see any other solution than keeping a database of NEED_XXX_R for
> each platform and then requiring these functions to show up before we
> declare a library to be thread-safe.  So far we're only dealing with three
> functions, to it should be doable.

Right.  We can't assume because a *_r function is missing that the
normal function is thread-safe.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Index tuple killing code committed
Next
From: Czuczy Gergely
Date:
Subject: Re: C++ and libpq