1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-06 18:42:54 +03:00

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.
This commit is contained in:
Magnus Hagander
2007-03-29 15:30:52 +00:00
parent ddcb5bbf76
commit 96b171903d
11 changed files with 213 additions and 127 deletions

View File

@@ -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])