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 an

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

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 check for that in

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Merlin Moncure
On 1/14/09, Bruce Momjian br...@momjian.us 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?

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Merlin Moncure wrote: On 1/14/09, Bruce Momjian br...@momjian.us 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?

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/ --

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 br...@momjian.us 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?

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Tom Lane
Bruce Momjian br...@momjian.us 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

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us 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

Re: [HACKERS] solaris libpq threaded build fails

2009-01-14 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Bruce Momjian br...@momjian.us 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

Re: [HACKERS] solaris libpq threaded build fails

2009-01-13 Thread Emanuel Calvo Franco
2009/1/12 Bruce Momjian br...@momjian.us: 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

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.

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

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 threads.

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 record straight,

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-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