[libcxx-commits] [PATCH] D99213: [libcxx] Avoid pulling in xlocinfo.h in public headers
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 24 14:32:52 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG675401e04c06: [libcxx] Avoid pulling in xlocinfo.h in public headers (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D99213?vs=332776&id=333129#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99213/new/
https://reviews.llvm.org/D99213
Files:
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
Index: libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp
+++ libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp
@@ -12,7 +12,6 @@
// clang-format off
// UNSUPPORTED: libcpp-has-no-localization
-// XFAIL: LIBCXX-WINDOWS-FIXME
// <ostream>
Index: libcxx/test/std/language.support/support.limits/support.limits.general/locale.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/locale.version.pass.cpp
@@ -12,7 +12,6 @@
// clang-format off
// UNSUPPORTED: libcpp-has-no-localization
-// XFAIL: LIBCXX-WINDOWS-FIXME
// <locale>
Index: libcxx/test/std/language.support/support.limits/support.limits.general/istream.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/istream.version.pass.cpp
@@ -12,7 +12,6 @@
// clang-format off
// UNSUPPORTED: libcpp-has-no-localization
-// XFAIL: LIBCXX-WINDOWS-FIXME
// <istream>
Index: libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.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/filesystem.version.pass.cpp
@@ -12,7 +12,6 @@
// clang-format off
// UNSUPPORTED: libcpp-has-no-filesystem-library
-// XFAIL: LIBCXX-WINDOWS-FIXME
// <filesystem>
Index: libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
===================================================================
--- libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
+++ libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp
@@ -13,8 +13,6 @@
// <complex>
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
// Test the feature test macros defined by <complex>
/* Constant Value
Index: libcxx/include/__support/win32/locale_win32.h
===================================================================
--- libcxx/include/__support/win32/locale_win32.h
+++ libcxx/include/__support/win32/locale_win32.h
@@ -12,9 +12,28 @@
#include <__config>
#include <stdio.h>
-#include <xlocinfo.h> // _locale_t
+#include <locale.h> // _locale_t
#include <__nullptr>
+#define _X_ALL LC_ALL
+#define _X_COLLATE LC_COLLATE
+#define _X_CTYPE LC_CTYPE
+#define _X_MONETARY LC_MONETARY
+#define _X_NUMERIC LC_NUMERIC
+#define _X_TIME LC_TIME
+#define _X_MAX LC_MAX
+#define _X_MESSAGES 6
+#define _NCAT (_X_MESSAGES + 1)
+
+#define _CATMASK(n) ((1 << (n)) >> 1)
+#define _M_COLLATE _CATMASK(_X_COLLATE)
+#define _M_CTYPE _CATMASK(_X_CTYPE)
+#define _M_MONETARY _CATMASK(_X_MONETARY)
+#define _M_NUMERIC _CATMASK(_X_NUMERIC)
+#define _M_TIME _CATMASK(_X_TIME)
+#define _M_MESSAGES _CATMASK(_X_MESSAGES)
+#define _M_ALL (_CATMASK(_NCAT) - 1)
+
#define LC_COLLATE_MASK _M_COLLATE
#define LC_CTYPE_MASK _M_CTYPE
#define LC_MONETARY_MASK _M_MONETARY
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99213.333129.patch
Type: text/x-patch
Size: 3630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210324/aeb91584/attachment-0001.bin>
More information about the libcxx-commits
mailing list