Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-14 Thread Bruce Momjian
Kurt Roeckx wrote: > On Sat, Jun 14, 2003 at 02:20:44PM -0400, Bruce Momjian wrote: > > > > This patch handles two more gethostbyname calls. > > > [...] > > diff -c -c -r1.24 fe-secure.c > > *** src/interfaces/libpq/fe-secure.c14 Jun 2003 17:49:54 - 1.24 > > --- src/interfaces/li

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-14 Thread Kurt Roeckx
On Sat, Jun 14, 2003 at 02:20:44PM -0400, Bruce Momjian wrote: > > This patch handles two more gethostbyname calls. > [...] > diff -c -c -r1.24 fe-secure.c > *** src/interfaces/libpq/fe-secure.c 14 Jun 2003 17:49:54 - 1.24 > --- src/interfaces/libpq/fe-secure.c 14 Jun 2003 18:08:54 -00

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-14 Thread Bruce Momjian
This patch handles two more gethostbyname calls. --- Lee Kindness wrote: Content-Description: message body text > Patch attached, along with new libpq-reentrant.c and libpq-reentrant.h > files for src/interfaces/libpq. > >

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-14 Thread Bruce Momjian
Here is the final patch for libpq threading. It adds the bulk of your patch, plus some cleanups on calling reentrant functions. We now have these per-platform configure settings: linux*) THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS" THREAD_LIBS="

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-14 Thread Bruce Momjian
I see these in the patch: /* Setup _THREAD_SAFE and _POSIX_PTHREAD_SEMANTICS, this will disappear * in time once tests to determine correct compiler switches for threads * are added to configure. */ #if !defined _THREAD_SAFE #define _THRE

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-13 Thread Bruce Momjian
Lee, I have been looking at the code, and though the quoted function is OK to avoid the non-posix case, it seems the later ones are a problem: #if defined HAVE_NONPOSIX_GETPWUID_R /* broken (well early POSIX draft) getpwuid_r() which returns * 'struct passwd *

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-13 Thread Lee Kindness
Bruce Momjian writes: > My point is why do we care whether it returns char * or nothing --- we > should just return strerrbuf in all cases. Ok, I see. Guess that is reasonable. L. ---(end of broadcast)--- TIP 7: don't forget to increase your free

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-13 Thread Bruce Momjian
My point is why do we care whether it returns char * or nothing --- we should just return strerrbuf in all cases. --- Lee Kindness wrote: > Your call, but the "broken" call is in earlier glibc versions for > sure (if you're

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-13 Thread Lee Kindness
Your call, but the "broken" call is in earlier glibc versions for sure (if you're on a Linux box take a look in /usr/include - the prototype is still there, may even get used depending on compiler options!). I seem to remember compiling this on recent Solaris, HPUX, Linux and AIX versions without h

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-06-13 Thread Bruce Momjian
Lee, I have a question about this code: char *pqStrerror(int errnum, char *strerrbuf, size_t buflen) { #if defined HAVE_STRERROR_R /* reentrant strerror_r is available */ strerror_r(errnum, strerrbuf, buflen); return strerrbuf;

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-02-03 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches I will try to apply it within the next 48 hours. --- Lee Kindness wrote: Content-Description:

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but

2003-01-13 Thread Lee Kindness
Ok guys, I propose that the new libpq diff and 2 source files which i'll soon send to pgsql-patches is applied to the source. This diff is a cleaned up version of the previous version with the wrapper functions moved out into their own file and more comments added. Also the use of crypt_r() has bee

Re: [PATCHES] [HACKERS] PostgreSQL libraries - PThread Support, but not use...

2003-01-09 Thread Lee Kindness
Tom, Tom Lane writes: > Lee Kindness <[EMAIL PROTECTED]> writes: > > + #define _THREAD_SAFE > > + #define _REENTRANT > > + #define _POSIX_PTHREAD_SEMANTICS > What is this stuff, and why isn't it wrapped in any sort of > platform-specific test? If it's needed, why is it in only one .c > fil