From 96b171903d5d52ca46b46bc3f73f13978705eae5 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 29 Mar 2007 15:30:52 +0000 Subject: Make ECPG regression tests use native threading instead of pthreads, now that ecpglib supports it. Change configure (patch from Bruce) and msvc build system to no longer require pthreads on win32, since all parts of postgresql can be thread-safe using the native platform functions. --- configure.in | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 194c56a5671..03511fbd464 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.506 2007/03/26 21:30:56 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.507 2007/03/29 15:30:51 mha Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -416,7 +416,13 @@ IFS=$ac_save_IFS # Enable thread-safe client libraries # AC_MSG_CHECKING([allow thread-safe client libraries]) +if test "$PORTNAME" != "win32"; then PGAC_ARG_BOOL(enable, thread-safety, no, [ --enable-thread-safety make client libraries thread-safe]) +else +# Win32 should always use threads +PGAC_ARG_BOOL(enable, thread-safety, yes, [ --enable-thread-safety make client libraries thread-safe]) +fi + PGAC_ARG_BOOL(enable, thread-safety-force, no, [ --enable-thread-safety-force force thread-safety in spite of thread test failure]) if test "$enable_thread_safety" = yes -o \ "$enable_thread_safety_force" = yes; then @@ -1108,8 +1114,8 @@ AC_FUNC_FSEEKO # For each platform, we need to know about any special compile and link # libraries, and whether the normal C function names are thread-safe. # See the comment at the top of src/port/thread.c for more information. -# -if test "$enable_thread_safety" = yes; then +# WIN32 doesn't need the pthread tests; it always uses threads +if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then ACX_PTHREAD # set thread flags # Some platforms use these, so just defineed them. They can't hurt if they @@ -1137,7 +1143,9 @@ _LIBS="$LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" +if test "$PORTNAME" != "win32"; then AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --enable-thread-safety])]) +fi AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r]) -- cgit v1.2.3