mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates. Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new configure script.
This commit is contained in:
@ -1,9 +1,3 @@
|
||||
case $host_os in
|
||||
bsdi2.0 | bsdi2.1 | bsdi3*) CC=gcc2;;
|
||||
esac
|
||||
|
||||
THREAD_SUPPORT=yes
|
||||
# verified 4.3.1 2004-02-11
|
||||
STRERROR_THREADSAFE=yes
|
||||
GETPWUID_THREADSAFE=yes
|
||||
GETHOSTBYNAME_THREADSAFE=yes
|
||||
|
@ -5,12 +5,5 @@ CC="$CC -no-cpp-precomp"
|
||||
# Select appropriate semaphore support
|
||||
USE_NAMED_POSIX_SEMAPHORES=1
|
||||
|
||||
THREAD_SUPPORT=yes
|
||||
# verified Mac OS X 10.3.3, Darwin Kernel Version 7.3.0, 2004-04-07
|
||||
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
|
||||
THREAD_LIBS="-lpthread"
|
||||
|
||||
STRERROR_THREADSAFE=yes
|
||||
GETPWUID_THREADSAFE=yes
|
||||
GETHOSTBYNAME_THREADSAFE=yes
|
||||
|
||||
PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
|
||||
|
@ -2,9 +2,7 @@ case $host_cpu in
|
||||
alpha*) CFLAGS="-O";; # alpha has problems with -O2
|
||||
esac
|
||||
|
||||
# tools/thread/thread_test must be run
|
||||
THREAD_CPPFLAGS="-D_THREAD_SAFE"
|
||||
case $host_os in
|
||||
freebsd2*|freebsd3*|freebsd4*) THREAD_LIBS="-pthread";;
|
||||
*) THREAD_LIBS="-lc_r";;
|
||||
freebsd2*|freebsd3*|freebsd4*) ;;
|
||||
*) THREAD_LIBS="c_r";; # do we need this? 2004-04-23
|
||||
esac
|
||||
|
@ -2,12 +2,4 @@
|
||||
CPPFLAGS="-D_GNU_SOURCE"
|
||||
|
||||
# tools/thread/thread_test must be run
|
||||
THREAD_CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
|
||||
THREAD_LIBS="-lpthread"
|
||||
|
||||
THREAD_SUPPORT=yes
|
||||
# 2004-03-14, Linux 2.4.25-1-686
|
||||
STRERROR_THREADSAFE=yes
|
||||
GETPWUID_THREADSAFE=no
|
||||
GETHOSTBYNAME_THREADSAFE=no
|
||||
|
||||
PTHREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
|
||||
|
@ -1,5 +1,2 @@
|
||||
# tools/thread/thread_test must be run
|
||||
case $build in
|
||||
*-netbsdelf[2-9]*) THREAD_CPPFLAGS="-pthread"; THREAD_LIBS="-pthread" ;;
|
||||
esac
|
||||
|
||||
|
@ -2,10 +2,3 @@ if test "$GCC" != yes ; then
|
||||
CC="$CC -std"
|
||||
CFLAGS="-O -ieee"
|
||||
fi
|
||||
|
||||
# tools/thread/thread_test must be run
|
||||
if test "$GCC" = yes
|
||||
then THREAD_LIBS="-pthread"
|
||||
else THREAD_CPPFLAGS="-pthread"
|
||||
THREAD_LIBS="-lpthread"
|
||||
fi
|
||||
|
@ -9,10 +9,5 @@ case $host in
|
||||
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
|
||||
esac
|
||||
|
||||
# tools/thread/thread_test must be run
|
||||
# -D_POSIX_PTHREAD_SEMANTICS enables 5-arg getpwuid_r, among other things
|
||||
THREAD_CPPFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
|
||||
if test "$GCC" != yes
|
||||
then THREAD_CPPFLAGS="$THREAD_CPPFLAGS -mt"
|
||||
fi
|
||||
THREAD_LIBS="-lpthread"
|
||||
PTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
|
||||
|
@ -1,5 +1,5 @@
|
||||
if test "$GCC" = yes; then
|
||||
THREAD_CPPFLAGS="-pthread"
|
||||
PTHREAD_CFLAGS="-pthread"
|
||||
else
|
||||
# The -Kno_host is for a bug in the compiler. See -hackers
|
||||
# discussion on 7-8/Aug/2003.
|
||||
@ -21,17 +21,11 @@ __EOF__
|
||||
fi
|
||||
rm -f conftest.*
|
||||
|
||||
THREAD_CPPFLAGS="-K pthread"
|
||||
PTHREAD_CFLAGS="-Kpthread"
|
||||
fi
|
||||
|
||||
# tools/thread/thread_test must be run
|
||||
THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"
|
||||
PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT"
|
||||
|
||||
# Disabled because flags are required for all apps using libpq.
|
||||
# Waiting to see if other platforms need this too. 2004-03-22
|
||||
#THREAD_SUPPORT=yes
|
||||
# verified UnixWare 7.1.4 2004-03-18
|
||||
STRERROR_THREADSAFE=yes
|
||||
GETPWUID_THREADSAFE=yes
|
||||
GETHOSTBYNAME_THREADSAFE=yes
|
||||
|
||||
|
Reference in New Issue
Block a user