Thread: Building Thread-Safe on OS X

Building Thread-Safe on OS X

From
Keary Suska
Date:
I followed the directions in the /src/tools/thread directory, ran the test
program, which said everything was OK and recommended another setting, which
I added to the template/reconfigured/recompiled. Both the test program and
readme mentioned thread-specific compiler directives but didn't say which or
what values, so I didn't add any.

Can I assume that I have a thread-safe libpq, or is there something I am
missing?

TIA,

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"


Re: Building Thread-Safe on OS X

From
Bruce Momjian
Date:
Keary Suska wrote:
> I followed the directions in the /src/tools/thread directory, ran the test
> program, which said everything was OK and recommended another setting, which
> I added to the template/reconfigured/recompiled. Both the test program and
> readme mentioned thread-specific compiler directives but didn't say which or
> what values, so I didn't add any.
>
> Can I assume that I have a thread-safe libpq, or is there something I am
> missing?

Sorry, you need to add --enable-thread-safety to the configure run.  In
7.5, you still need the flag, but all the testing is done automatically.

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

Re: Building Thread-Safe on OS X

From
Keary Suska
Date:
on 6/2/04 1:53 PM, pgman@candle.pha.pa.us purportedly said:

> Keary Suska wrote:
>> I followed the directions in the /src/tools/thread directory, ran the test
>> program, which said everything was OK and recommended another setting, which
>> I added to the template/reconfigured/recompiled. Both the test program and
>> readme mentioned thread-specific compiler directives but didn't say which or
>> what values, so I didn't add any.
>>
>> Can I assume that I have a thread-safe libpq, or is there something I am
>> missing?
>
> Sorry, you need to add --enable-thread-safety to the configure run.  In
> 7.5, you still need the flag, but all the testing is done automatically.

I did that--the only direction I didn't follow (because I wasn't sure what
was needed) was the following:
    "add any THREAD_CPPFLAGS and THREAD_LIBS defines to your
template/${port} file"

Do you think I'm OK then?

Best,

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"


Re: Building Thread-Safe on OS X

From
Bruce Momjian
Date:
Keary Suska wrote:
> on 6/2/04 1:53 PM, pgman@candle.pha.pa.us purportedly said:
>
> > Keary Suska wrote:
> >> I followed the directions in the /src/tools/thread directory, ran the test
> >> program, which said everything was OK and recommended another setting, which
> >> I added to the template/reconfigured/recompiled. Both the test program and
> >> readme mentioned thread-specific compiler directives but didn't say which or
> >> what values, so I didn't add any.
> >>
> >> Can I assume that I have a thread-safe libpq, or is there something I am
> >> missing?
> >
> > Sorry, you need to add --enable-thread-safety to the configure run.  In
> > 7.5, you still need the flag, but all the testing is done automatically.
>
> I did that--the only direction I didn't follow (because I wasn't sure what
> was needed) was the following:
>     "add any THREAD_CPPFLAGS and THREAD_LIBS defines to your
> template/${port} file"
>
> Do you think I'm OK then?

If the test program ran OK with no flag, you should be OK.

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