aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/descriptor.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-11-27 22:34:03 +1300
committerThomas Munro <tmunro@postgresql.org>2024-11-27 23:12:19 +1300
commitf1da075d9a0373c08af32e31dcbf0809ae4aec2f (patch)
tree44d661b23b3795c5763ead455b58be4a010fe8ec /src/interfaces/ecpg/ecpglib/descriptor.c
parent63e10988f8705cc56ac242fa21ec42dd87e99cbf (diff)
downloadpostgresql-f1da075d9a0373c08af32e31dcbf0809ae4aec2f.tar.gz
postgresql-f1da075d9a0373c08af32e31dcbf0809ae4aec2f.zip
Remove configure check for _configthreadlocale().
All modern Windows systems have _configthreadlocale(). It was first introduced in msvcr80.dll from Visual Studio 2005. Historically, MinGW was stuck on even older msvcrt.dll, but added its own dummy implementation of the function when using msvcrt.dll years ago anyway, effectively rendering the configure test useless. In practice we don't encounter the dummy anymore because modern MinGW uses ucrt. Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CWZBBRR6YA8D.8EHMDRGLCKCD%40neon.tech
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/descriptor.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c
index ad279e245c4..56e2bc41531 100644
--- a/src/interfaces/ecpg/ecpglib/descriptor.c
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -490,7 +490,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
Assert(ecpg_clocale);
stmt.oldlocale = uselocale(ecpg_clocale);
#else
-#ifdef HAVE__CONFIGTHREADLOCALE
+#ifdef WIN32
stmt.oldthreadlocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
#endif
stmt.oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno);
@@ -510,7 +510,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
setlocale(LC_NUMERIC, stmt.oldlocale);
ecpg_free(stmt.oldlocale);
}
-#ifdef HAVE__CONFIGTHREADLOCALE
+#ifdef WIN32
if (stmt.oldthreadlocale != -1)
(void) _configthreadlocale(stmt.oldthreadlocale);
#endif