mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +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:
@@ -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
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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"
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user