crt: Add a compatibility wrapper for _get_current_locale
This function only exists since Windows 8, but is is currently used
by libc++.
This fixes linker errors with libc++ when linking against msvcrt.dll.
This compatibility wrapper only returns NULL and doesn't attempt keeping
track of what the last set locale actually was. (Doing that is a bit hard
as well, since _get_current_locale is supposed to allocate and populate
a _locale_t struct, while setlocale only gets a locale name string.)
The parts of libc++ using this function probably won't work perfectly
on versions prior to Windows 8 with this wrapper, but this allows building
libc++ in general for a wider range of Windows versions, and having these
parts working as intended on Windows 8 and newer.
Signed-off-by: Martin Storsjö <martin@martin.st>
3 files changed