Re: 7.4.2 on Solaris 9 - Error - Mailing list pgsql-general

From Bruce Momjian
Subject Re: 7.4.2 on Solaris 9 - Error
Date
Msg-id 200403261824.i2QIOXQ20048@candle.pha.pa.us
Whole thread Raw
In response to 7.4.2 on Solaris 9 - Error  (Carmen Gloria Sepulveda Dedes <csepulveda@atichile.com>)
List pgsql-general
wespvp@syntegra.com wrote:
> On 3/25/04 4:13 PM, "Bruce Momjian" <pgman@candle.pha.pa.us> wrote:
>
> > Are you sure your change is correct?  We just added
> > "-D_POSIX_PTHREAD_SEMANTICS" in post 7.4.2, and the submitters did not
> > mention any problems with the -pthread line for gcc.
> >
> > I just tried it on Sourceforge's Solaris 9 and I see:
> >
> > bash-2.05$ gcc -pthread
> > gcc: unrecognized option `-pthread'
> > gcc: no input files
> >
> > which seems to indicate you are right.  I am kind of surprised.  Some
> > platforms to take -pthread, some -lpthread, so I am pretty sure it was
> > specified by the original Solaris guy.
>
> Don't know...  I assume it was just a typo that wouldn't show up if you were
> using SUNWSPRO compiler instead of GCC.
>
> > OK, new template/solaris version applied to 7.4.X and head:
>
> [snip]
>
> > THREAD_SUPPORT=yes
> > NEED_REENTRANT_FUNCS=yes    # 5.6 2003-09-13
> > THREAD_CPPFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
> > if test "$GCC" != yes
> > then    THREAD_CPPFLAGS="$THREAD_CPPFLAGS -mt"
> > fi
> > THREAD_LIBS="-lpthread"
>
> Shouldn't that be
>
> THREAD_CPPFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
>
> According to Jan, -D_REENTRANT must also be specified for libpq to be built
> correctly.

OK, I added -D_REENTRANT.

> Why isn't -D_THREAD_SAFE required also?

No idea?  Someone?

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

pgsql-general by date:

Previous
From: Dustin Sallings
Date:
Subject: Re: pg_dump "what if?"
Next
From: Terry Lee Tucker
Date:
Subject: Re: Passing a row