From f1da075d9a0373c08af32e31dcbf0809ae4aec2f Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Wed, 27 Nov 2024 22:34:03 +1300 Subject: 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 Discussion: https://postgr.es/m/CWZBBRR6YA8D.8EHMDRGLCKCD%40neon.tech --- src/interfaces/ecpg/ecpglib/execute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interfaces/ecpg/ecpglib/execute.c') diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index c578c21cf66..466d5600f9b 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1995,7 +1995,7 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator, return false; } #else -#ifdef HAVE__CONFIGTHREADLOCALE +#ifdef WIN32 stmt->oldthreadlocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); #endif stmt->oldlocale = ecpg_strdup(setlocale(LC_NUMERIC, NULL), lineno); @@ -2219,7 +2219,7 @@ ecpg_do_epilogue(struct statement *stmt) #else if (stmt->oldlocale) setlocale(LC_NUMERIC, stmt->oldlocale); -#ifdef HAVE__CONFIGTHREADLOCALE +#ifdef WIN32 /* * This is a bit trickier than it looks: if we failed partway through -- cgit v1.2.3