diff options
author | Thomas Munro <tmunro@postgresql.org> | 2023-07-12 06:20:37 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2023-07-12 08:20:43 +1200 |
commit | 68a4b58eca032916e2aad78d63f717dcb147e906 (patch) | |
tree | d944d9ffb794df9d70c6408475f20d20a0580080 /src/interfaces/libpq/fe-connect.c | |
parent | 11f36694091c97318e5a2bd28b35ffe9aa1c3b6a (diff) |
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
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index a8584d2c684..837c5321aa1 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -52,13 +52,11 @@ #include <netinet/tcp.h> #endif -#ifdef ENABLE_THREAD_SAFETY #ifdef WIN32 #include "pthread-win32.h" #else #include <pthread.h> #endif -#endif #ifdef USE_LDAP #ifdef WIN32 @@ -7784,7 +7782,6 @@ pqGetHomeDirectory(char *buf, int bufsize) static void default_threadlock(int acquire) { -#ifdef ENABLE_THREAD_SAFETY #ifndef WIN32 static pthread_mutex_t singlethread_lock = PTHREAD_MUTEX_INITIALIZER; #else @@ -7813,7 +7810,6 @@ default_threadlock(int acquire) if (pthread_mutex_unlock(&singlethread_lock)) Assert(false); } -#endif } pgthreadlock_t |