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-secure.c | |
parent | 11f36694091c97318e5a2bd28b35ffe9aa1c3b6a (diff) | |
download | postgresql-68a4b58eca032916e2aad78d63f717dcb147e906.tar.gz postgresql-68a4b58eca032916e2aad78d63f717dcb147e906.zip |
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-secure.c')
-rw-r--r-- | src/interfaces/libpq/fe-secure.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 8069e381424..bd72a87bbba 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -35,13 +35,11 @@ #include <sys/stat.h> -#ifdef ENABLE_THREAD_SAFETY #ifdef WIN32 #include "pthread-win32.h" #else #include <pthread.h> #endif -#endif #include "fe-auth.h" #include "libpq-fe.h" @@ -56,8 +54,6 @@ #define SIGPIPE_MASKED(conn) ((conn)->sigpipe_so || (conn)->sigpipe_flag) -#ifdef ENABLE_THREAD_SAFETY - struct sigpipe_info { sigset_t oldsigmask; @@ -90,24 +86,6 @@ struct sigpipe_info pq_reset_sigpipe(&(spinfo).oldsigmask, (spinfo).sigpipe_pending, \ (spinfo).got_epipe); \ } while (0) -#else /* !ENABLE_THREAD_SAFETY */ - -#define DECLARE_SIGPIPE_INFO(spinfo) pqsigfunc spinfo = NULL - -#define DISABLE_SIGPIPE(conn, spinfo, failaction) \ - do { \ - if (!SIGPIPE_MASKED(conn)) \ - spinfo = pqsignal(SIGPIPE, SIG_IGN); \ - } while (0) - -#define REMEMBER_EPIPE(spinfo, cond) - -#define RESTORE_SIGPIPE(conn, spinfo) \ - do { \ - if (!SIGPIPE_MASKED(conn)) \ - pqsignal(SIGPIPE, spinfo); \ - } while (0) -#endif /* ENABLE_THREAD_SAFETY */ #else /* WIN32 */ #define DECLARE_SIGPIPE_INFO(spinfo) @@ -524,7 +502,7 @@ PQgssEncInUse(PGconn *conn) #endif /* ENABLE_GSS */ -#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32) +#if !defined(WIN32) /* * Block SIGPIPE for this thread. This prevents send()/write() from exiting @@ -608,4 +586,4 @@ pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe) SOCK_ERRNO_SET(save_errno); } -#endif /* ENABLE_THREAD_SAFETY && !WIN32 */ +#endif /* !WIN32 */ |