]> granicus.if.org Git - postgresql/commitdiff
Supress ecpg thread test if configure didn't enable threads. Fix
authorBruce Momjian <bruce@momjian.us>
Fri, 19 Dec 2003 23:29:29 +0000 (23:29 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 19 Dec 2003 23:29:29 +0000 (23:29 +0000)
tools/thread to run even if configure didn't enable threads because this
test is used before enabling threads for the OS.

src/Makefile.global.in
src/interfaces/ecpg/test/Makefile
src/tools/thread/thread_test.c

index 4e75818948917e0784d7e5e2fea7f5978df7ed63..19c49d1468d844d95a2006916d2eb129cb43eeb8 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.170 2003/09/27 16:24:44 momjian Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.170.2.1 2003/12/19 23:29:29 momjian Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -121,7 +121,6 @@ localedir := @localedir@
 #
 # Records the choice of the various --enable-xxx and --with-xxx options.
 
-with_threads   = @with_threads@
 with_java      = @with_java@
 with_perl      = @with_perl@
 with_python    = @with_python@
@@ -131,6 +130,7 @@ enable_shared       = @enable_shared@
 enable_rpath   = @enable_rpath@
 enable_nls     = @enable_nls@
 enable_debug   = @enable_debug@
+enable_thread_safety   = @enable_thread_safety@
 
 python_includespec     = @python_includespec@
 python_libspec         = @python_libspec@
index 7f6835498da83e8a4be2c00425bc1dedb0dbeca7..9322101f281db7f26494946fc39e5800a204db6e 100644 (file)
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Makefile,v 1.41 2003/09/27 15:32:48 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/ecpg/test/Makefile,v 1.41.2.1 2003/12/19 23:29:29 momjian Exp $
 
 subdir = src/interfaces/ecpg/test
 top_builddir = ../../../..
@@ -8,7 +8,10 @@ override CPPFLAGS := -I$(srcdir)/../include -I$(libpq_srcdir) $(CPPFLAGS) $(THRE
 
 ECPG = ../preproc/ecpg -I$(srcdir)/../include
 
-TESTS = test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init testdynalloc num_test dt_test test_informix test_thread
+TESTS = test1 test2 test3 test4 perftest dyntest dyntest2 test_notice test_code100 test_init testdynalloc num_test dt_test test_informix
+ifeq ($(enable_thread_safety), yes)
+TESTS += test_thread
+endif
 
 all: $(TESTS)
 
index edfb885d0543eabd10887a4543d9c8edb5fd355a..4010e8518e1f277c6b163384aee05f8eda774b0e 100644 (file)
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- *     $Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.3.2.1 2003/11/24 13:11:27 petere Exp $
+ *     $Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.3.2.2 2003/12/19 23:29:29 momjian Exp $
  *
  *     This program tests to see if your standard libc functions use
  *     pthread_setspecific()/pthread_getspecific() to be thread-safe.
  *-------------------------------------------------------------------------
  */
 
-
-#ifdef ENABLE_THREAD_SAFETY
 #include <pthread.h>
-#endif
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>