Re: MSVC: Improve warning options set
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter@eisentraut.org>,
Bryan Green <dbryan.green@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-11-09T00:29:36Z
Lists: pgsql-hackers
On Sun, Nov 9, 2025 at 10:58 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > I don't quite understand how 1758d4244 didn't break building with > MSVCRT? But if it builds yet doesn't in fact work, that's likely to > draw complaints from people who didn't spot the documentation change. I think it links against MinGW shims that at least in some cases can be replaced at runtime with something looked up by dlsym(), but are otherwise no-op/fail implementations. I expect it was a moving target over the decades, because the shims were added with potentially long lag, ie when someone cared enough to write the patch because their program was affected. In that problem report we had 'The operating system could not find any locale data for the locale name "en-US"', but it beats me whether that was "dummy _create_locale() always returns NULL[1]" or "found MSVCRT's version of _create_locale() but it expects locale data files installed at a different location than UCRT's and they aren't there because MSVCRT is dead and we're chasing ghosts" :-) > So I'd lean towards back-patching. Cool. Will do that after the freeze, unless someone show up with a concrete reason not to. [1] https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-crt/misc/_create_locale.c#L13
Commits
-
Fix "inconsistent DLL linkage" warning on Windows MSVC
- a3ea5330fcf4 19 (unreleased) landed
-
MSVC: Improve warning options set
- 2307cfe31621 19 (unreleased) landed
-
Enable MSVC conforming preprocessor
- 8fd9bb1d9654 19 (unreleased) cited
-
Fix warnings about declaration of environ on MinGW.
- 7bc9a8bdd2d6 18.0 cited
-
Require ucrt if using MinGW.
- 1758d4244616 18.0 cited