diff options
author | Thomas Munro <tmunro@postgresql.org> | 2024-11-27 22:34:03 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2024-11-27 23:12:19 +1300 |
commit | f1da075d9a0373c08af32e31dcbf0809ae4aec2f (patch) | |
tree | 44d661b23b3795c5763ead455b58be4a010fe8ec /src/interfaces/ecpg/ecpglib/execute.c | |
parent | 63e10988f8705cc56ac242fa21ec42dd87e99cbf (diff) | |
download | postgresql-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/execute.c')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/execute.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |