Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)

Поиск
Список
Период
Сортировка
От Olivier PRENANT
Тема Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Дата
Msg-id 3F55FA9D.9030904@pyrenet.fr
обсуждение исходный текст
Ответ на 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 ...)  (Olivier PRENANT <ohp@pyrenet.fr>)
Список pgsql-hackers
Larry Rosenman wrote:

>
>
> --On Tuesday, September 02, 2003 11:35:25 -0400 Bruce Momjian 
> <pgman@candle.pha.pa.us> wrote:
>
>> Larry Rosenman wrote:
>>
>>>
>>>
>>> --On Tuesday, September 02, 2003 11:20:14 -0400 Bruce Momjian
>>> <pgman@candle.pha.pa.us> wrote:
>>>
>>> > 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.
>>> So, given that UnixWare doesn't have gethostbyname_r and strerror_r, 
>>> but
>>> does have
>>> getpwuid_r, will y'all declare that UnixWare has thread-safety?
>>>
>>> My vote is YES.
>>
>>
>> I am inclined to think yes.  It would prevent uglification of the code
>> by not having to special-case Unixware.
>>
>> However, I was able to read the libc sources to confirm thread-safety.
>> Because you can not see the source, would you try a threaded program and
>> see if calls to getpwuid from different threads return different
>> pointer values?
>
> It won't prove anything on MY box, as it is a UNIPROCESSOR, so the 
> threads won't be dispatched at the same time.

I have 2 bi-pro machines here both running unixware 7.1.3 I can make 
tests if you want

>
> It's ok to assume thread-safety, as the SCO developer (Kean Johnston) 
> asked the threads guys, and he said that the libc stuff is thread-safe 
> so they don't have to have 2 different versions in libc.
>
> LER
>
>
>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [GENERAL] Using oids
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: libpq makefile for bcc