mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove --disable-thread-safety and related code.
All supported computers have either POSIX or Windows threads, and we no longer have any automated testing of --disable-thread-safety. We define a vestigial ENABLE_THREAD_SAFETY macro to 1 in ecpg_config.h in case it is useful, but we no longer test it anywhere in PostgreSQL code, and associated dead code paths are removed. The Meson and perl-based Windows build scripts never had an equivalent build option. Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/CA%2BhUKGLtmexrpMtxBRLCVePqV_dtWG-ZsEbyPrYc%2BNBB2TkNsw%40mail.gmail.com
This commit is contained in:
54
configure
vendored
54
configure
vendored
@ -722,7 +722,6 @@ with_tcl
|
||||
ICU_LIBS
|
||||
ICU_CFLAGS
|
||||
with_icu
|
||||
enable_thread_safety
|
||||
INCLUDES
|
||||
autodepend
|
||||
PKG_CONFIG_LIBDIR
|
||||
@ -848,7 +847,6 @@ with_CC
|
||||
with_llvm
|
||||
enable_depend
|
||||
enable_cassert
|
||||
enable_thread_safety
|
||||
with_icu
|
||||
with_tcl
|
||||
with_tclconfig
|
||||
@ -1536,7 +1534,6 @@ Optional Features:
|
||||
--enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
|
||||
--enable-depend turn on automatic dependency tracking
|
||||
--enable-cassert enable assertion checks (for debugging)
|
||||
--disable-thread-safety disable thread-safety in client libraries
|
||||
--disable-largefile omit support for large files
|
||||
|
||||
Optional Packages:
|
||||
@ -8338,43 +8335,6 @@ $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
|
||||
done
|
||||
IFS=$ac_save_IFS
|
||||
|
||||
#
|
||||
# Enable thread-safe client libraries
|
||||
#
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
|
||||
$as_echo_n "checking allow thread-safe client libraries... " >&6; }
|
||||
|
||||
|
||||
# Check whether --enable-thread-safety was given.
|
||||
if test "${enable_thread_safety+set}" = set; then :
|
||||
enableval=$enable_thread_safety;
|
||||
case $enableval in
|
||||
yes)
|
||||
:
|
||||
;;
|
||||
no)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
enable_thread_safety=yes
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_thread_safety" = yes; then
|
||||
|
||||
$as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
|
||||
$as_echo "$enable_thread_safety" >&6; }
|
||||
|
||||
|
||||
#
|
||||
# ICU
|
||||
#
|
||||
@ -11064,7 +11024,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
|
||||
if test "$PORTNAME" != "win32"; then :
|
||||
# then
|
||||
|
||||
|
||||
@ -11723,7 +11683,7 @@ if test "x$ac_cv_header_pthread_h" = xyes; then :
|
||||
|
||||
else
|
||||
as_fn_error $? "
|
||||
pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
|
||||
pthread.h not found" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
@ -12407,8 +12367,7 @@ if test "$ac_res" != no; then :
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_thread_safety" = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
|
||||
$as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
|
||||
if ${ac_cv_search_pthread_barrier_wait+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@ -12464,7 +12423,6 @@ if test "$ac_res" != no; then :
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "$with_readline" = yes; then
|
||||
|
||||
@ -13349,7 +13307,7 @@ else
|
||||
thread_safe_libldap=no
|
||||
fi
|
||||
|
||||
if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
|
||||
if test "$thread_safe_libldap" = no; then
|
||||
# Use ldap_r for FE if available, else assume ldap is thread-safe.
|
||||
# On some platforms ldap_r fails to link without PTHREAD_LIBS.
|
||||
LIBS="$_LIBS"
|
||||
@ -16377,8 +16335,7 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "$enable_thread_safety" = yes; then
|
||||
ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
|
||||
ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
|
||||
if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
|
||||
$as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
|
||||
|
||||
@ -16392,7 +16349,6 @@ esac
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
|
||||
# Cygwin and (apparently, based on test results) Mingw both
|
||||
|
Reference in New Issue
Block a user