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

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date: 2003-09-03 18:03:27
Message-ID: 220340000.1062612207@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Wednesday, September 03, 2003 14:00:55 -0400 Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> Larry Rosenman wrote:
>> >> > Woh, I thought we just agreed that getpwuid_r() isn't required for
>> >> > thread-safety on your platform.
>> >> it's CLEANER to use it.
>> >>
>> >> Our API Signature is the _r version, why not use it when it's
>> >> available?
>> >
>> > My new patch will optionally use it if it exists, but we still need to
>> > know if it is required so if we don't find it, we throw an error.
>>
>> On UnixWare, either should be thread-safe, to the best of my knowledge.
>> HOWEVER,
>> UnixWare has the getpwuid_r version, and since our API(from thread.c) is
>> the _r signature,
>> we should just return getpwuid_r(...,....,..., etc).
>
> OK, I have marked Unixware as not requiring *_r functions. I decided
> against optionally using the *_r functions if they exist because it
> requires more tests/defines in configure.in, the standard changed the
> arguments for some *_r functions over time (from drafts), and there is
> no advantage if the libc versions are thread-safe already.
Ok, I guess I can live with this, but our API from the rest of libpq to
thread.c is
the getpwuid_r() api.

I would think it would make more sense to use it if it's available.

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-09-03 18:16:06 Re: TCP/IP with 7.4 beta2 broken?
Previous Message ohp 2003-09-03 18:03:03 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)