Re: thread_test.c problems

From: <wespvp(at)syntegra(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, <wespvp(at)syntegra(dot)com>
Cc: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>, joseph speigle <joe(dot)speigle(at)jklh(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: thread_test.c problems
Date: 2004-04-25 00:09:27
Message-ID: BCB06BE7.7E1D%wespvp@syntegra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 4/23/04 6:59 PM, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

>
> I have just commited to CVS code that will do all the compile/library
> flags and thread tests automatically. Let me know how it works for
> you. Thanks.

No, I don't think it is right. I did a 'cvs update', then ran 'configure'.
Templates/darwin contains the information below. I don't know if it is
supposed to contain the three *_TREADSAFE lines any more, but shouldn't it
at least have the 'THREAD_SUPPORT' and 'THREAD_LIBS' entries?

The output of thread_test run manually is:

wrp% ./thread_test
Your errno is thread-safe.
Your system has sterror_r(); it does not need strerror().
Your system has getpwuid_r(); it does not need getpwuid().
Your system has getaddrinfo(); it does not need gethostbyname()
or gethostbyname_r().

Your platform is thread-safe.

------
The current darwin file:
------

# Apple's cpp-precomp seems a tad broken, so don't use it
# (Note: on OS X before 10.2, you might need -traditional-cpp instead)
CC="$CC -no-cpp-precomp"

# Select appropriate semaphore support
USE_NAMED_POSIX_SEMAPHORES=1

# verified Mac OS X 10.3.3, Darwin Kernel Version 7.3.0, 2004-04-07
PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"

-------
The darwin file I had been using with 10.3.3 is:
-------

# Apple's cpp-precomp seems a tad broken, so don't use it
# (Note: on OS X before 10.2, you might need -traditional-cpp instead)
#CC="$CC -no-cpp-precomp"

# Select appropriate semaphore support
USE_NAMED_POSIX_SEMAPHORES=1

# tools/thread/thread_test must be run
THREAD_SUPPORT=yes
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
THREAD_LIBS="-lpthread"

STRERROR_THREADSAFE=yes
GETPWUID_THREADSAFE=yes
GETHOSTBYNAME_THREADSAFE=yes

#NEED_REENTRANT_FUNCS=yes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Wood 2004-04-25 00:52:22 Re: [OT] Tom's/Marc's spam filters?
Previous Message Alvaro Herrera 2004-04-24 23:50:54 Re: target list evaluation wrt sequences

Browse pgsql-hackers by date

  From Date Subject
Next Message emf 2004-04-25 01:48:48 Re: The case for preserving case.
Previous Message Robert Treat 2004-04-24 22:53:16 Re: Do we prefer software that works or software that looks good?