aboutsummaryrefslogtreecommitdiff
path: root/src/tools/thread
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-04-23 18:15:55 +0000
committerBruce Momjian <bruce@momjian.us>2004-04-23 18:15:55 +0000
commit7a66015e98e890c27e3483a413d5a88927c5b818 (patch)
tree3a58d7f41460697adb2eb1e24ba9e1d1c5dcfb03 /src/tools/thread
parent77528c9bd7e0203d5670a550947cfa367ac51ad8 (diff)
downloadpostgresql-7a66015e98e890c27e3483a413d5a88927c5b818.tar.gz
postgresql-7a66015e98e890c27e3483a413d5a88927c5b818.zip
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/tools/thread')
-rw-r--r--src/tools/thread/Makefile6
-rw-r--r--src/tools/thread/README8
-rw-r--r--src/tools/thread/thread_test.c4
3 files changed, 10 insertions, 8 deletions
diff --git a/src/tools/thread/Makefile b/src/tools/thread/Makefile
index bfe67a33dd8..3334d41e248 100644
--- a/src/tools/thread/Makefile
+++ b/src/tools/thread/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (C) 2003 by PostgreSQL Global Development Team
#
-# $PostgreSQL: pgsql/src/tools/thread/Makefile,v 1.3 2003/11/29 19:52:14 pgsql Exp $
+# $PostgreSQL: pgsql/src/tools/thread/Makefile,v 1.4 2004/04/23 18:15:55 momjian Exp $
#
#-------------------------------------------------------------------------
@@ -19,9 +19,9 @@ ifeq ($(THREAD_SUPPORT), )
$(error You have not configured your template/$$port file. See the README)
endif
-override CFLAGS += $(THREAD_CPPFLAGS)
+override CFLAGS += $(PTHREAD_CFLAGS)
-LDFLAGS += $(THREAD_LIBS)
+LDFLAGS += $(PTHREAD_LIBS)
all: thread_test
diff --git a/src/tools/thread/README b/src/tools/thread/README
index 6d285302179..d5b9dab7924 100644
--- a/src/tools/thread/README
+++ b/src/tools/thread/README
@@ -6,9 +6,11 @@ thread-safe, or if we should use *_r functions or thread locking.
To use this program, you must:
- o add "THREAD_SUPPORT=yes" to your template/${port} file
- o add any THREAD_CPPFLAGS and THREAD_LIBS defines to your
- template/${port} file
o run "configure --enable-thread-safety"
o compile the main source tree
o compile and run this program
+
+If your platform requires special thread flags that are not tested by
+/config/acx_pthread.m4, add PTHREAD_CFLAGS and PTHREAD_LIBS defines to
+your template/${port} file.
+
diff --git a/src/tools/thread/thread_test.c b/src/tools/thread/thread_test.c
index 2b322140e4e..d866f21dbd1 100644
--- a/src/tools/thread/thread_test.c
+++ b/src/tools/thread/thread_test.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.19 2004/04/22 23:58:03 momjian Exp $
+ * $PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.20 2004/04/23 18:15:55 momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
}
printf("\
-Make sure you have added any needed 'THREAD_CPPFLAGS' and 'THREAD_LIBS'\n\
+Make sure you have added any needed 'PTHREAD_CFLAGS' and 'PTHREAD_LIBS'\n\
defines to your template/$port file before compiling this program.\n\n"
);