summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/memory.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-07-12 06:20:37 +1200
committerThomas Munro <tmunro@postgresql.org>2023-07-12 08:20:43 +1200
commit68a4b58eca032916e2aad78d63f717dcb147e906 (patch)
treed944d9ffb794df9d70c6408475f20d20a0580080 /src/interfaces/ecpg/ecpglib/memory.c
parent11f36694091c97318e5a2bd28b35ffe9aa1c3b6a (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/ecpg/ecpglib/memory.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/memory.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/interfaces/ecpg/ecpglib/memory.c b/src/interfaces/ecpg/ecpglib/memory.c
index bd812510549..a83637ac758 100644
--- a/src/interfaces/ecpg/ecpglib/memory.c
+++ b/src/interfaces/ecpg/ecpglib/memory.c
@@ -68,7 +68,6 @@ struct auto_mem
struct auto_mem *next;
};
-#ifdef ENABLE_THREAD_SAFETY
static pthread_key_t auto_mem_key;
static pthread_once_t auto_mem_once = PTHREAD_ONCE_INIT;
@@ -97,12 +96,6 @@ set_auto_allocs(struct auto_mem *am)
{
pthread_setspecific(auto_mem_key, am);
}
-#else
-static struct auto_mem *auto_allocs = NULL;
-
-#define get_auto_allocs() (auto_allocs)
-#define set_auto_allocs(am) do { auto_allocs = (am); } while(0)
-#endif
char *
ecpg_auto_alloc(long size, int lineno)