]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Properly set NEED_REENTRANT_FUNCS for threaded libpq/ecpg.
authorBruce Momjian <bruce@momjian.us>
Wed, 11 Feb 2004 17:32:09 +0000 (17:32 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 11 Feb 2004 17:32:09 +0000 (17:32 +0000)
Without this patch, no thread locking or *_r functions were being used.

configure
configure.in
src/include/pg_config.h.in

index b7f3d2bab6f7dd7cbf77427af4e127da3152c35a..40824514fb39f3049b72a9c4bb5291f76fd1de7b 100755 (executable)
--- a/configure
+++ b/configure
 # functions are marked "not found", which is perfect.
 #
 if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_REENTRANT_FUNCS 1
+_ACEOF
+
 _CFLAGS="$CFLAGS"
 _LIBS="$LIBS"
 CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
index 8c58f628bb9017d7021d410e0de753beddcc82ca..b26c5fe10845a9522ce344da9d042e54c18debfe 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $Header: /cvsroot/pgsql/configure.in,v 1.301.2.4 2003/12/13 16:57:36 momjian Exp $
+dnl $Header: /cvsroot/pgsql/configure.in,v 1.301.2.5 2004/02/11 17:32:09 momjian Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -1053,6 +1053,7 @@ AC_SUBST(THREAD_LIBS)
 # functions are marked "not found", which is perfect.
 #
 if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then
+AC_DEFINE(NEED_REENTRANT_FUNCS, 1, [Define if non *_r libc functions are not thread safe])
 _CFLAGS="$CFLAGS"
 _LIBS="$LIBS"
 CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
index b53fed22572ed85e0490530b6bd650c0457ad0e2..4691b81da32d146928c24231123bd9d434630052 100644 (file)
 /* Define as the maximum alignment requirement of any C data type. */
 #undef MAXIMUM_ALIGNOF
 
+/* Define if non *_r libc functions are not thread safe */
+#undef NEED_REENTRANT_FUNCS
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT