Commit 15b330b6 authored by Bruce Momjian's avatar Bruce Momjian

Properly set NEED_REENTRANT_FUNCS for threaded libpq/ecpg.

Without this patch, no thread locking or *_r functions were being used.
parent ac4ad7bf
...@@ -13243,6 +13243,11 @@ fi ...@@ -13243,6 +13243,11 @@ fi
# functions are marked "not found", which is perfect. # functions are marked "not found", which is perfect.
# #
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then
cat >>confdefs.h <<\_ACEOF
#define NEED_REENTRANT_FUNCS 1
_ACEOF
_CFLAGS="$CFLAGS" _CFLAGS="$CFLAGS"
_LIBS="$LIBS" _LIBS="$LIBS"
CFLAGS="$CFLAGS $THREAD_CPPFLAGS" CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
......
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.314 2004/02/10 19:55:45 tgl Exp $ dnl $PostgreSQL: pgsql/configure.in,v 1.315 2004/02/11 17:29:01 momjian Exp $
dnl dnl
dnl Developers, please strive to achieve this order: dnl Developers, please strive to achieve this order:
dnl dnl
...@@ -1003,6 +1003,7 @@ AC_SUBST(THREAD_LIBS) ...@@ -1003,6 +1003,7 @@ AC_SUBST(THREAD_LIBS)
# functions are marked "not found", which is perfect. # functions are marked "not found", which is perfect.
# #
if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then 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" _CFLAGS="$CFLAGS"
_LIBS="$LIBS" _LIBS="$LIBS"
CFLAGS="$CFLAGS $THREAD_CPPFLAGS" CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
......
...@@ -554,6 +554,9 @@ ...@@ -554,6 +554,9 @@
/* Define as the maximum alignment requirement of any C data type. */ /* Define as the maximum alignment requirement of any C data type. */
#undef MAXIMUM_ALIGNOF #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. */ /* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment