[libcxx] Avoid pulling in xlocinfo.h in public headers
authorMartin Storsjö <martin@martin.st>
Tue, 23 Mar 2021 20:02:26 +0000 (22:02 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 24 Mar 2021 21:29:59 +0000 (23:29 +0200)
commit675401e04c0687693c3b869410ed575387e7d8d6
tree9720f91e5d02c47c739c6e39cf11232bb50f8daa
parent39f3e9a9e07db547b8daac67155abf3a56b34181
[libcxx] Avoid pulling in xlocinfo.h in public headers

Including xlocinfo.h is a bit of a layering violation; locale.h is
the C library header we should use, while xlocinfo.h is essentially
part of the MS C++ library. Including xlocinfo.h brings in yvals.h,
which brings in yvals_core.h, which defines the MS STL's version
support macros, overriding what libc++'s <version> had defined.

Instead just include locale.h, and provide the few defines we need
for locale categories manually.

Differential Revision: https://reviews.llvm.org/D99213
libcxx/include/__support/win32/locale_win32.h
libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp