Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> Bruce Momjian writes: >>> Is there any objection to applying this to 8.4? >> >> Yes. I don't think we should bother with a one-operating-system patch >> for an OS version that was obsolete ten years ago. (Even if I am still >> running it ;-).) If we

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Is there any objection to applying this to 8.4? > > Yes. I don't think we should bother with a one-operating-system patch > for an OS version that was obsolete ten years ago. (Even if I am still > running it ;-).) If we do this, the next thing will b

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Tom Lane
Bruce Momjian writes: > Is there any objection to applying this to 8.4? Yes. I don't think we should bother with a one-operating-system patch for an OS version that was obsolete ten years ago. (Even if I am still running it ;-).) If we do this, the next thing will be trying to work around what

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Bruce Momjian wrote: > Merlin Moncure wrote: > > On 1/14/09, Bruce Momjian wrote: > > > OK, patch attached and applied to CVS HEAD. The nsl (not 'nls') library > > > check was removed in Postgres 8.2 here: > > > > As long as you are looking at this, can you take a peek at this patch? > > http:/

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Andrew Chernow
Bruce Momjian wrote: Also the calling of the function with all null pointers seems dangerous, Its only trying to compile it, AC_TRY_COMPILE, not execute it. I don't "think?" the NULL pointers could ever raise havoc. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ -- S

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Merlin Moncure wrote: > On 1/14/09, Bruce Momjian wrote: > > OK, patch attached and applied to CVS HEAD. The nsl (not 'nls') library > > check was removed in Postgres 8.2 here: > > As long as you are looking at this, can you take a peek at this patch? > http://archives.free.net.ph/message/20081

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Merlin Moncure
On 1/14/09, Bruce Momjian wrote: > OK, patch attached and applied to CVS HEAD. The nsl (not 'nls') library > check was removed in Postgres 8.2 here: As long as you are looking at this, can you take a peek at this patch? http://archives.free.net.ph/message/20081116.053100.15b5801d.fi.html We ha

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Andrew Chernow wrote: > > >>> > >> Forgot to mention, there is an easy fix: > >> > >> ~]# LDFLAGS="-lnsl" ./configure --enable-thread-safety > > > > But I assume that only works if I use gethostbyname_r(), right? > > No, works for gethostbyname as well. They are all in libnsl. > > > But we do c

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Andrew Chernow
AC_SEARCH_LIBS(gethostbyname_r, c nsl) Just don't put "c" in there. You usually don't want an explicit -lc to appear in your link commands. Correct. Copied that from an internal project, which I should fix. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ -- Sent via p

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Peter Eisentraut
Andrew Chernow wrote: The problem with the current check is its only an AC_CHECK_FUNCS. We need an AC_SEARCH_LIBS first so the proper -llibrary is appended to LIBS, which is used by AC_CHECK_FUNCS. AC_SEARCH_LIBS(gethostbyname_r, c nsl) Just don't put "c" in there. You usually don't want a

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Andrew Chernow
Forgot to mention, there is an easy fix: ~]# LDFLAGS="-lnsl" ./configure --enable-thread-safety But I assume that only works if I use gethostbyname_r(), right? No, works for gethostbyname as well. They are all in libnsl. But we do check for that in thread_test.c. The problem with

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Bruce Momjian
Andrew Chernow wrote: > Andrew Chernow wrote: > > Bruce Momjian wrote: > >> I supposed Solaris 2.5.1 (release 1996) is just too old to add > >> threading, and this code has been unchanged for years. > >> > > > > Yeah, its old. Unfortunately for us, we still have to support it. > > > > To set the

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Bruce Momjian
Andrew Chernow wrote: > Bruce Momjian wrote: > > I supposed Solaris 2.5.1 (release 1996) is just too old to add > > threading, and this code has been unchanged for years. > > > > Yeah, its old. Unfortunately for us, we still have to support it. > > To set the record straight, the issue is not t

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Andrew Chernow
Andrew Chernow wrote: Bruce Momjian wrote: I supposed Solaris 2.5.1 (release 1996) is just too old to add threading, and this code has been unchanged for years. Yeah, its old. Unfortunately for us, we still have to support it. To set the record straight, the issue is not threads. Threads w

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Andrew Chernow
Bruce Momjian wrote: I supposed Solaris 2.5.1 (release 1996) is just too old to add threading, and this code has been unchanged for years. Yeah, its old. Unfortunately for us, we still have to support it. To set the record straight, the issue is not threads. Threads work fine on 2.5.1. Th

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Emanuel Calvo Franco
2009/1/12 Bruce Momjian : > > I supposed Solaris 2.5.1 (release 1996) is just too old to add > threading, and this code has been unchanged for years. > > --- > > Andrew Chernow wrote: >> for anyone interested >> >> Solaris

Re: [HACKERS] solaris libpq threaded build fails

2009-01-12 Thread Bruce Momjian
I supposed Solaris 2.5.1 (release 1996) is just too old to add threading, and this code has been unchanged for years. --- Andrew Chernow wrote: > for anyone interested > > Solaris 2.5.1 with --enable-thread-safety > >

[HACKERS] solaris libpq threaded build fails

2008-11-18 Thread Andrew Chernow
for anyone interested Solaris 2.5.1 with --enable-thread-safety configure:25848: gcc -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -pthreads -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SE