summaryrefslogtreecommitdiff
path: root/src/template
diff options
context:
space:
mode:
authorBruce Momjian2004-04-23 18:15:55 +0000
committerBruce Momjian2004-04-23 18:15:55 +0000
commit7a66015e98e890c27e3483a413d5a88927c5b818 (patch)
tree3a58d7f41460697adb2eb1e24ba9e1d1c5dcfb03 /src/template
parent77528c9bd7e0203d5670a550947cfa367ac51ad8 (diff)
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.
Diffstat (limited to 'src/template')
-rw-r--r--src/template/bsdi6
-rw-r--r--src/template/darwin9
-rw-r--r--src/template/freebsd6
-rw-r--r--src/template/linux10
-rw-r--r--src/template/netbsd3
-rw-r--r--src/template/osf7
-rw-r--r--src/template/solaris7
-rw-r--r--src/template/unixware12
8 files changed, 8 insertions, 52 deletions
diff --git a/src/template/bsdi b/src/template/bsdi
index dd750bdc997..dce8fb404ea 100644
--- a/src/template/bsdi
+++ b/src/template/bsdi
@@ -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
diff --git a/src/template/darwin b/src/template/darwin
index cd60b83fe07..bffb0d4ea03 100644
--- a/src/template/darwin
+++ b/src/template/darwin
@@ -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"
diff --git a/src/template/freebsd b/src/template/freebsd
index c78b87bd761..38c58a6e6ef 100644
--- a/src/template/freebsd
+++ b/src/template/freebsd
@@ -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
diff --git a/src/template/linux b/src/template/linux
index 3684f1a1802..95c1b182fe5 100644
--- a/src/template/linux
+++ b/src/template/linux
@@ -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"
diff --git a/src/template/netbsd b/src/template/netbsd
index 120ed59bf47..c45260ca136 100644
--- a/src/template/netbsd
+++ b/src/template/netbsd
@@ -1,5 +1,2 @@
# tools/thread/thread_test must be run
-case $build in
- *-netbsdelf[2-9]*) THREAD_CPPFLAGS="-pthread"; THREAD_LIBS="-pthread" ;;
-esac
diff --git a/src/template/osf b/src/template/osf
index c331ed7f3dc..e845cfecea8 100644
--- a/src/template/osf
+++ b/src/template/osf
@@ -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
diff --git a/src/template/solaris b/src/template/solaris
index ce71bbe9181..d6d9fbc794a 100644
--- a/src/template/solaris
+++ b/src/template/solaris
@@ -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"
diff --git a/src/template/unixware b/src/template/unixware
index ea66f47f410..e7e63f65daa 100644
--- a/src/template/unixware
+++ b/src/template/unixware
@@ -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
-