Revert "Blind attempt to fix _configthreadlocale() failures on MinGW."
authorThomas Munro <tmunro@postgresql.org>
Wed, 27 Nov 2024 09:56:41 +0000 (22:56 +1300)
committerThomas Munro <tmunro@postgresql.org>
Wed, 27 Nov 2024 10:20:10 +0000 (23:20 +1300)
commita62d90f2e5cb55d0c8998b63120d6db3c55df866
tree73b138c9851d6539c5853b5ff165d45e34cc11f9
parent1758d42446161f5dfae9b14791c5640239b86faa
Revert "Blind attempt to fix _configthreadlocale() failures on MinGW."

This reverts commit 2cf91ccb73ce888c44e3751548fb7c77e87335f2.

When using the old msvcrt.dll, MinGW would supply its own dummy version
of _configthreadlocale() that just returns -1 if you try to use it.  For
a time we tolerated that to shut the build farm up.  We would fall back
to code that was enough for the tests to pass, but it would surely have
risked crashing a real multithreaded program.

We don't need that kludge anymore, because we can count on ucrt.  We
expect the real _configthreadlocale() to be present, and the ECPG tests
will now fail if it isn't.  The workaround was dead code and it's time
to revert it.

(A later patch still under review proposes to remove this use of
_configthreadlocale() completely but we're unwinding this code in
steps.)

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/d9e7731c-ca1b-477c-9298-fa51e135574a%40eisentraut.org
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/execute.c