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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Date: 2003-08-30 04:17:41
Message-ID: 200308300417.h7U4Hf822789@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Larry Rosenman wrote:
>
>
> --On Saturday, August 30, 2003 01:09:54 -0300 "Marc G. Fournier"
> <scrappy(at)hub(dot)org> wrote:
>
>
> >
> > 'K, but why the change to NEEDS_REENTRANT_FUNC_NAMES in the first place?
> >
> > The thing that has me most confused here is that the end result is the
> > same with or without the patch, from what I can tell ... the right side of
> > the && will always resolve to TRUE, before or after the patch ... no?
> I want to conditionalize ONLY getpwuid_r, and not strerror_r and
> gethostbyname_r.
>
> So, I changed the NEED_REENTRANT_FUNC_NAMES to no, or undefined in the
> template, and need a configure check to set HAVE_GETPWUID_R, so we will
> use getpwuid_r in the ENABLE_THREADS case.
>
> UnixWare does NOT have strerror_r nor does it have gethostbyname_r, and the
> libc versions are reentrant in libc, for those 2. We need to use
> getpwuid_r for
> threaded apps.
>
> Does this clarify things?

Yes, and that is the complex part because _some_ non-*_r functions are
thread-safe, and some are not. I have to determine if we have other
such platforms before I figure out how to fix it in the cleanest way.

In most platforms that are like this, I think, they have all the *_r
functions even if all of them are not required.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2003-08-30 04:32:22 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)
Previous Message Larry Rosenman 2003-08-30 04:13:40 Re: Unixware Patch (Was: Re: Beta2 Tag'd and Bundled ...)