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

2003-09-13 Thread Bruce Momjian
[ I have retained the original email below so people can remember where we left this.] After much agonizing, I have applied a patch to attempt threading in this order: use non-*_r function names if they are all thread-safe (NEED_REENTRANT_FUNCS=no) use *_r functions if they

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

2003-09-10 Thread Philip Yarra
On Wed, 10 Sep 2003 02:39 pm, Tom Lane wrote: > A thread-safe implementation of > libpq is of zero value to an application unless it also has thread-safe > implementations of the other libraries it depends on. Not necessarily so - we've managed okay so far (several years) working on platforms t

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

2003-09-10 Thread Greg Stark
Philip Yarra <[EMAIL PROTECTED]> writes: > On Wed, 10 Sep 2003 02:15 pm, Bruce Momjian wrote: > > This would be a pretty short list unless I count wrong! This excludes all > releases of FreeBSD (and I'm willing to bet other BSDs), Solaris (at least > the old version I have), OSF, Linux, and who

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

2003-09-09 Thread Tom Lane
Philip Yarra <[EMAIL PROTECTED]> writes: > On Wed, 10 Sep 2003 02:15 pm, Bruce Momjian wrote: >> Tom Lane wrote: >>> It doesn't seem to me that we should take on the job of providing >>> thread-safe implementations of basic libc functions. If a particular >>> OS cannot manage to offer that functio

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

2003-09-09 Thread Philip Yarra
On Wed, 10 Sep 2003 02:15 pm, Bruce Momjian wrote: > Tom Lane wrote: > > It doesn't seem to me that we should take on the job of providing > > thread-safe implementations of basic libc functions. If a particular > > OS cannot manage to offer that functionality, then we should mark it > > not-threa

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

2003-09-09 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tripple-yuck. :-) > > It doesn't seem to me that we should take on the job of providing > thread-safe implementations of basic libc functions. If a particular > OS cannot manage to offer that functionality, then we should mark it >

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

2003-09-09 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tripple-yuck. :-) > > It doesn't seem to me that we should take on the job of providing > thread-safe implementations of basic libc functions. If a particular > OS cannot manage to offer that functionality, then we should mark it >

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

2003-09-09 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tripple-yuck. :-) It doesn't seem to me that we should take on the job of providing thread-safe implementations of basic libc functions. If a particular OS cannot manage to offer that functionality, then we should mark it not-thread-safe and move on.

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

2003-09-09 Thread Philip Yarra
On Wed, 10 Sep 2003 12:29 pm, Bruce Momjian wrote: > --- anyway, it is probably threadsafe, but strerror isn't, so we are > dead anyway. :-) Oh, I see. Yep, good point. Strange that strerror isn't threadsafe when everything else is... maybe Strange is OSF's middle name. > > #ifdef SOME_DEF (sor

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

2003-09-09 Thread Bruce Momjian
Philip Yarra wrote: > On Wed, 10 Sep 2003 11:46 am, Bruce Momjian wrote: > > I see --- looks bad failures below for OSF, Solaris, and FreeBSD > > below. > > Actually, I am not sure the OSF failure is correctly reported... your test app > had me a little baffled in that case. Baffler is my m

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

2003-09-09 Thread Philip Yarra
On Wed, 10 Sep 2003 11:46 am, Bruce Momjian wrote: > I see --- looks bad failures below for OSF, Solaris, and FreeBSD > below. Actually, I am not sure the OSF failure is correctly reported... your test app had me a little baffled in that case. > We would have to get some thread mutex, make

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

2003-09-09 Thread Bruce Momjian
Philip Yarra wrote: > On Thu, 4 Sep 2003 05:36 am, Bruce Momjian wrote: > > I would like every operating system that supports thread-safety to run > > this program and report back the results. > > Okay, here's results from the machines I have access to... I think what you're > going to find is th

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

2003-09-09 Thread Philip Yarra
On Thu, 4 Sep 2003 05:36 am, Bruce Momjian wrote: > I would like every operating system that supports thread-safety to run > this program and report back the results. Okay, here's results from the machines I have access to... I think what you're going to find is that an awful lot of platforms tha

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

2003-09-03 Thread Larry Rosenman
Can you pass me what's in CVS (anon hasn't updated afaict). And, what didn't you like about my version? LER --On Wednesday, September 03, 2003 18:35:44 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: >> > What does your OS want for the 3rd argument of pthread_create()? I

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

2003-09-03 Thread Bruce Momjian
Kurt Roeckx wrote: > On Wed, Sep 03, 2003 at 03:36:53PM -0400, Bruce Momjian wrote: > > > > I would like every operating system that supports thread-safety to run > > this program and report back the results. > > On a Linux system with glibc 2.1: > Your gethostbyname() is _not_ thread-safe > Your

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

2003-09-03 Thread Bruce Momjian
Larry Rosenman wrote: > >> > What does your OS want for the 3rd argument of pthread_create()? I > >> > thought a void pointer would be OK for everyone: > >> > > >> > pthread_create(&thread1, NULL, (void *) func_call_1, NULL); > >> > >> void *(*start_routine)(void*) > >> > >> Here is our man p

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

2003-09-03 Thread Bruce Momjian
Larry Rosenman wrote: > >From UnixWare: > > $ cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl > UX:acomp: WARNING: "test_thread.c", line 60: argument #3 incompatible with > prototype: pthread_create() > UX:acomp: WARNING: "test_thread.c", line 61: argument #3 incompatible with > prot

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

2003-09-03 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > FWIW, I do confirm, on dual XEON with JT enabled Operating system? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your

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

2003-09-03 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > FWIW, I do confirm, on dual XEON with JT enabled Oh, I now see OS as Unixware: > I have 2 bi-pro machines here both running unixware > 7.1.3 I can make tests if you want -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

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

2003-09-03 Thread Larry Rosenman
--On Wednesday, September 03, 2003 16:51:51 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: > From UnixWare: $ cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl UX:acomp: WARNING: "test_thread.c", line 60: argument #3 incompatible with prototype: pthread_create(

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

2003-09-03 Thread Bruce Momjian
Larry Rosenman wrote: > > > --On Wednesday, September 03, 2003 16:51:51 -0400 Bruce Momjian > <[EMAIL PROTECTED]> wrote: > > > Larry Rosenman wrote: > >> > From UnixWare: > >> > >> $ cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl > >> UX:acomp: WARNING: "test_thread.c", line 60: ar

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

2003-09-03 Thread Larry Rosenman
--On Wednesday, September 03, 2003 17:09:49 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: --On Wednesday, September 03, 2003 16:51:51 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: > Larry Rosenman wrote: >> > From UnixWare: >> >> $ cc -O -Kpthread test_thread.c -o test

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

2003-09-03 Thread Kurt Roeckx
On Wed, Sep 03, 2003 at 03:36:53PM -0400, Bruce Momjian wrote: > > I would like every operating system that supports thread-safety to run > this program and report back the results. On a Linux system with glibc 2.1: Your gethostbyname() is _not_ thread-safe Your getpwuid() is _not_ thread-safe Yo

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

2003-09-03 Thread ohp
e: [HACKERS] Unixware Patch (Was: Re: Beta2 Tag'd and Bundled > ...) > > >From UnixWare: > > $ cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl > UX:acomp: WARNING: "test_thread.c", line 60: argument #3 incompatible with > prototype: pthread_c

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

2003-09-03 Thread Larry Rosenman
From UnixWare: $ cc -O -Kpthread test_thread.c -o test_thread -lsocket -lnsl UX:acomp: WARNING: "test_thread.c", line 60: argument #3 incompatible with prototype: pthread_create() UX:acomp: WARNING: "test_thread.c", line 61: argument #3 incompatible with prototype: pthread_create() $ ./test_threa

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

2003-09-03 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > > Olivier PRENANT wrote: > > > >> 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. > > > > > > > If any o

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

2003-09-03 Thread Larry Rosenman
--On Wednesday, September 03, 2003 14:00:55 -0400 Bruce Momjian <[EMAIL PROTECTED]> 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

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

2003-09-03 Thread ohp
MAIL PROTECTED] > Subject: Re: [HACKERS] Unixware Patch (Was: Re: Beta2 Tag'd and Bundled > ...) > > Olivier PRENANT wrote: > > >> It's ok to assume thread-safety, as the SCO developer (Kean Johnston) > > >> asked the threads guys, and he said that

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

2003-09-03 Thread Bruce Momjian
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 ex

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

2003-09-03 Thread Bruce Momjian
Olivier PRENANT wrote: > >> 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 > >> > >> > >> > > > If any one can write a pro

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

2003-09-03 Thread Olivier PRENANT
Olivier PRENANT wrote: Larry Rosenman wrote: 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 progra

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

2003-09-03 Thread Olivier PRENANT
Larry Rosenman wrote: --On Tuesday, September 02, 2003 11:35:25 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: --On Tuesday, September 02, 2003 11:20:14 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: > Peter Eisentraut wrote: >> Lee Kindness writes: >> >> > You don't..

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 18:32:03 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: >> >> Bruce Momjian writes: >> >> > Right. We can't assume because a *_r function is missing that >> >> > the normal function is thread-safe. >> > >> >> That's not our concern - if

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

2003-09-02 Thread Bruce Momjian
Larry Rosenman wrote: > >> >> Bruce Momjian writes: > >> >> > Right. We can't assume because a *_r function is missing that the > >> >> > normal function is thread-safe. > >> > > >> >> That's not our concern - if the OS isn't thread safe we can't do > >> >> anything about it, and to worry about

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 18:12:48 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: --On Tuesday, September 02, 2003 19:53:38 +0200 Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Lee Kindness writes: > >> Bruce Momjian writes: >> > Right. We can't assume because a

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

2003-09-02 Thread Bruce Momjian
Larry Rosenman wrote: > > > --On Tuesday, September 02, 2003 19:53:38 +0200 Peter Eisentraut > <[EMAIL PROTECTED]> wrote: > > > Lee Kindness writes: > > > >> Bruce Momjian writes: > >> > Right. We can't assume because a *_r function is missing that the > >> > normal function is thread-safe.

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

2003-09-02 Thread Bruce Momjian
Lee Kindness wrote: > Bruce Momjian writes: > > Lee Kindness wrote: > > > No, it's not. Using the _r functions on such systems is BETTER because > > > the API is clean and the function can be implmented in a reentrant and > > > thread-safe fashion wuithout the need for thread local storage or >

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 19:53:38 +0200 Peter Eisentraut <[EMAIL PROTECTED]> wrote: Lee Kindness writes: Bruce Momjian writes: > Right. We can't assume because a *_r function is missing that the > normal function is thread-safe. That's not our concern - if the OS isn't thread safe

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

2003-09-02 Thread Peter Eisentraut
Lee Kindness writes: > Bruce Momjian writes: > > Right. We can't assume because a *_r function is missing that the > > normal function is thread-safe. > That's not our concern - if the OS isn't thread safe we can't do > anything about it, and to worry about it is an enormous waste of > develop

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

2003-09-02 Thread Lee Kindness
Bruce Momjian writes: > Lee Kindness wrote: > > No, it's not. Using the _r functions on such systems is BETTER because > > the API is clean and the function can be implmented in a reentrant and > > thread-safe fashion wuithout the need for thread local storage or > > mutex locking. > I don't

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

2003-09-02 Thread Lee Kindness
Bruce Momjian writes: > Right. We can't assume because a *_r function is missing that the > normal function is thread-safe. I recon i'll get blue in the face before long, and one of you guys will fly over to Scotland to give me a good kicking!... But'll say it again anyway... That's not our co

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 11:35:25 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: --On Tuesday, September 02, 2003 11:20:14 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: > Peter Eisentraut wrote: >> Lee Kindness writes: >> >> > You don't... and you simply shouldn

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

2003-09-02 Thread Bruce Momjian
Larry Rosenman wrote: > > > --On Tuesday, September 02, 2003 11:20:14 -0400 Bruce Momjian > <[EMAIL PROTECTED]> 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 -

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 11:32:08 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: > Where does it say that you have to use getpwuid_r() to be thread safe? > I don't see any mention in the docs. It does say about getpwuid: > > For getpwent, getpwuid, getpwnam,

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

2003-09-02 Thread Bruce Momjian
Larry Rosenman wrote: > > Where does it say that you have to use getpwuid_r() to be thread safe? > > I don't see any mention in the docs. It does say about getpwuid: > > > > For getpwent, getpwuid, getpwnam, setpwent, endpwent, and > > fgetpwent, all information is contained in a static

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 11:20:14 -0400 Bruce Momjian <[EMAIL PROTECTED]> 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

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

2003-09-02 Thread Bruce Momjian
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

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

2003-09-02 Thread Bruce Momjian
Lee Kindness wrote: > Tom Lane writes: > > Greg Stark <[EMAIL PROTECTED]> writes: > > > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > > > APIs. They can never be made thread-safe. The *_r versions of these functions > > > are standardized and required. If they don

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

2003-09-02 Thread Larry Rosenman
--On Tuesday, September 02, 2003 00:04:35 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: >> > Oh, interesting. So you are saying that if the OS supports threads, >> > then we use the *_r if they have them, and assume the non *_r >> > functions are already thread-safe if t

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

2003-09-02 Thread Bruce Momjian
Larry Rosenman wrote: > >> > Oh, interesting. So you are saying that if the OS supports threads, > >> > then we use the *_r if they have them, and assume the non *_r functions > >> > are already thread-safe if they don't. Interesting. > >> > > >> > That seems to be what we have on Unixware, and o

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

2003-09-02 Thread Lee Kindness
Lee Kindness writes: > Tom Lane writes: > > Greg Stark <[EMAIL PROTECTED]> writes: > > > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > > > APIs. They can never be made thread-safe. The *_r versions of these functions > > > are standardized and required. If th

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

2003-09-02 Thread Bruce Momjian
Marc G. Fournier wrote: > > > On Mon, 1 Sep 2003, Peter Eisentraut wrote: > > > Greg Stark writes: > > > > > Um. I don't think that's true. I mean, in theory it's true, but in practice > > > why would an OS have some *_r but have only non-thread-safe versions of > > > others? > > > > The questio

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

2003-09-02 Thread Lee Kindness
Tom Lane writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > > APIs. They can never be made thread-safe. The *_r versions of these functions > > are standardized and required. If they don't exist then the platform sim

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

2003-09-02 Thread Marc G. Fournier
On Mon, 1 Sep 2003, Peter Eisentraut wrote: > Greg Stark writes: > > > Um. I don't think that's true. I mean, in theory it's true, but in practice > > why would an OS have some *_r but have only non-thread-safe versions of > > others? > > The question is whether configure can reliably identify w

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

2003-09-01 Thread Gaetano Mendola
"Peter Eisentraut" <[EMAIL PROTECTED]> wrote: > Reentrancy is (usually) a property of the interface (hence *_r functions > with differing interfaces), thread-safety is a feature of the > implementation; May I not agree with this definition ? Reentrancy is a property of the implemention that assu

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

2003-09-01 Thread Peter Eisentraut
Tom Lane writes: > This statement is simply false. A platform can build thread-safe > versions of those "unsafe" APIs if it makes the return values point > to thread-local storage. Some BSDs do it that way. Accordingly, any > simplistic "we must have _r to be thread-safe" approach is incorrect.

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

2003-09-01 Thread Peter Eisentraut
Greg Stark writes: > Um. I don't think that's true. I mean, in theory it's true, but in practice > why would an OS have some *_r but have only non-thread-safe versions of > others? The question is whether configure can reliably identify whether various *_r functions exist. I think it can't. For

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

2003-09-01 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > > APIs. They can never be made thread-safe. The *_r versions of these functions > > are standardized and required. If they don't exist then

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

2003-09-01 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > On the other hand, things like, getpwnam, strtok, etc have non-thread-safe > APIs. They can never be made thread-safe. The *_r versions of these functions > are standardized and required. If they don't exist then the platform simply > does not support thread

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

2003-09-01 Thread Larry Rosenman
--On Monday, September 01, 2003 22:02:00 +0100 Lee Kindness <[EMAIL PROTECTED]> wrote: "Larry Rosenman" <[EMAIL PROTECTED]> writes: then how do we *PROVE* thread-safety on a particular platform? You're not going to be able to prove it anyway! which is my point. L. -- Larry Rosenman

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

2003-09-01 Thread Lee Kindness
"Larry Rosenman" <[EMAIL PROTECTED]> writes: > then how do we *PROVE* thread-safety on a particular platform? You're not going to be able to prove it anyway! L. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? htt

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

2003-09-01 Thread Lee Kindness
"Tom Lane" <[EMAIL PROTECTED]> writes: > Lee Kindness <[EMAIL PROTECTED]> writes: > > Guys, too much thought is being spent on this... > > 1. For the _r functions we "need" we should ALWAYS use them if the > > system we are building on has them - they WILL be thread-safe. > > > 2. If the system is

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

2003-09-01 Thread Larry Rosenman
--On Monday, September 01, 2003 16:01:16 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Lee Kindness <[EMAIL PROTECTED]> writes: Guys, too much thought is being spent on this... 1. For the _r functions we "need" we should ALWAYS use them if the system we are building on has them - they WILL be threa

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

2003-09-01 Thread Tom Lane
Lee Kindness <[EMAIL PROTECTED]> writes: > Guys, too much thought is being spent on this... > 1. For the _r functions we "need" we should ALWAYS use them if the > system we are building on has them - they WILL be thread-safe. > 2. If the system is missing a _r function then we implement a wrapper

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

2003-09-01 Thread Lee Kindness
Guys, too much thought is being spent on this... 1. For the _r functions we "need" we should ALWAYS use them if the system we are building on has them - they WILL be thread-safe. 2. If the system is missing a _r function then we implement a wrapper to call the normal non-_r version. However we do

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

2003-09-01 Thread Larry Rosenman
--On Monday, September 01, 2003 14:24:14 -0300 "Marc G. Fournier" <[EMAIL PROTECTED]> wrote: On Mon, 1 Sep 2003, Bruce Momjian wrote: Larry Rosenman wrote: > > > --On Monday, September 01, 2003 12:35:43 -0400 Bruce Momjian > <[EMAIL PROTECTED]> wrote: > > > > >> Um. I don't think that's true

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

2003-09-01 Thread Marc G. Fournier
On Mon, 1 Sep 2003, Bruce Momjian wrote: > Larry Rosenman wrote: > > > > > > --On Monday, September 01, 2003 12:35:43 -0400 Bruce Momjian > > <[EMAIL PROTECTED]> wrote: > > > > > > > >> Um. I don't think that's true. I mean, in theory it's true, but in > > >> practice why would an OS have some *

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

2003-09-01 Thread Larry Rosenman
--On Monday, September 01, 2003 13:11:25 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Larry Rosenman wrote: --On Monday, September 01, 2003 12:35:43 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: > >> Um. I don't think that's true. I mean, in theory it's true, but in >> practice why would a

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

2003-09-01 Thread Bruce Momjian
Larry Rosenman wrote: > > > --On Monday, September 01, 2003 12:35:43 -0400 Bruce Momjian > <[EMAIL PROTECTED]> wrote: > > > > >> Um. I don't think that's true. I mean, in theory it's true, but in > >> practice why would an OS have some *_r but have only non-thread-safe > >> versions of others?

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

2003-09-01 Thread Larry Rosenman
--On Monday, September 01, 2003 12:35:43 -0400 Bruce Momjian <[EMAIL PROTECTED]> wrote: Um. I don't think that's true. I mean, in theory it's true, but in practice why would an OS have some *_r but have only non-thread-safe versions of others? Oh, interesting. So you are saying that if the OS

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

2003-09-01 Thread Bruce Momjian
Greg Stark wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > We could go down that road. The only other OS that needs *_r functions > > is Linux, and it uses all *_r functions. How do we configure to throw > > an error in that OS if we don't fined all of them? Maybe we need a > > three-v

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

2003-09-01 Thread Greg Stark
Bruce Momjian <[EMAIL PROTECTED]> writes: > We could go down that road. The only other OS that needs *_r functions > is Linux, and it uses all *_r functions. How do we configure to throw > an error in that OS if we don't fined all of them? Maybe we need a > three-valued variable instead of bool

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

2003-09-01 Thread Bruce Momjian
Greg Stark wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > > 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 automat

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

2003-09-01 Thread Greg Stark
Peter Eisentraut <[EMAIL PROTECTED]> writes: > 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) >

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

2003-09-01 Thread Bruce Momjian
Kurt Roeckx wrote: > On Sun, Aug 31, 2003 at 12:04:58PM +0200, 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

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

2003-08-31 Thread Kurt Roeckx
On Sun, Aug 31, 2003 at 12:04:58PM +0200, 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 determinati

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

2003-08-31 Thread Peter Eisentraut
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.

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

2003-08-31 Thread Lee Kindness
Bruce Momjian writes: > Marc G. Fournier wrote: > > On Sat, 30 Aug 2003, Bruce Momjian wrote: > > > > > 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 h