On Mon, 6 Jul 2026, Kirill Makurin wrote:

Currently, we expose `_create_locale`, `_free_locale` and `_get_current_locale` unconditionally.

For msvcrt.dll, we provide wrappers which check their presence at runtime, and replace them with simple stubs if they are not available. Original commit[1] which added wrapper for `_get_current_locale` states that it was added to allow building libc++ with msvcrt.dll, or at least this is my understanding.

In my previous replies I expressed my opinion that we eventually should fix this and expose them only when _WIN32_WINNT set to 0x0602 or higher. In the meantime, we can continue always exposing them with msvcrt.dll, so project like libc++ continue building as expected.

I don't see the urgency of doing this, really.

Like a million other functions, that only are present in some newer version of msvcrt.dll, we expose the declarations unconditionally, and we statically link in a helper function that checks with GetProcAddress if the function is available, and uses it if it is available, otherwise use a (potentially non-functional) dummy replacement function.

Why do you feel the need to remove these, specifically, compared with other functions that are runtime loaded?

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to