[libcxx] [Windows] Use the standard vsnprintf instead of _vsnprintf
authorMartin Storsjö <martin@martin.st>
Thu, 20 Jan 2022 11:46:49 +0000 (11:46 +0000)
committerMartin Storsjö <martin@martin.st>
Mon, 31 Jan 2022 20:29:12 +0000 (22:29 +0200)
commit1a5388ca67b03ca21043369f2023ffa0e9bc35dc
treecc0e0db1153b77df95f332a51a228f8cee4ed74c
parent0ee7a2c3046d465b199375bfe212d3d209967b03
[libcxx] [Windows] Use the standard vsnprintf instead of _vsnprintf

In ancient Microsoft C runtimes, there might only have been
a nonstandard `_vsnprintf` instead of the standard `vsnprintf`, but
in modern versions (the only ones relevant for libc++), both
are available.

In MinGW configurations built with `__USE_MINGW_ANSI_STDIO=1` (as it
is built in CI), `vsnprintf` provides a more standards compliant
behaviour than what Microsoft's CRT provides, while `_vsnprintf` retains
the Microsoft C runtime specific quirks.

Differential Revision: https://reviews.llvm.org/D118187
libcxx/src/support/win32/support.cpp
libcxx/test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_double.pass.cpp