[libcxx] [Windows] Make a more proper implementation of strftime_l for mingw with...
authorMartin Storsjö <martin@martin.st>
Mon, 28 Oct 2019 21:53:09 +0000 (23:53 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 14 Jan 2020 20:29:47 +0000 (22:29 +0200)
commit337e4359645ebd0f35136dbec9b51c48b9071f9c
tree9f35699f7d157ca1db05d1cf1e676ec164adb3dd
parent26d96126a0d258afccfeec1fbaa727bfeb820308
[libcxx] [Windows] Make a more proper implementation of strftime_l for mingw with msvcrt.dll

This also makes this function consistent with the rest of the
libc++ provided fallbacks.

The locale support in msvcrt.dll is very limited anyway; it can
only be configured processwide, not per thread, and it only seems
to support the locales "C" and "" (the user set locale), so it's
hard to make any meaningful automatic test for it. But manually tested,
this change does make time formatting locale code in libc++ output
times in the user requested format, when using locale "".

Differential Revision: https://reviews.llvm.org/D69554
libcxx/include/support/win32/locale_win32.h
libcxx/src/support/win32/locale_win32.cpp