[libcxx-commits] [PATCH] D129862: [libc++][AIX] Correct the definition of __regex_word for AIX
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 15 08:23:25 PDT 2022
xingxue created this revision.
xingxue added reviewers: ldionne, Mordante, philnik, daltenty, hubert.reinterpretcast.
xingxue added a project: LLVM.
Herald added a project: All.
xingxue requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
The patch changes the definition of `__regex_word` to 0x8000 for AIX because the current definition 0x80 clashes with `ctype_base::print` (`_ISPRINT` is defined as 0x80 in AIX ctype.h).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129862
Files:
libcxx/include/__locale
libcxx/test/std/re/re.traits/isctype.pass.cpp
libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
Index: libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
===================================================================
--- libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
+++ libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-AIX-FIXME
-
// <regex>
// template <class charT> struct regex_traits;
Index: libcxx/test/std/re/re.traits/isctype.pass.cpp
===================================================================
--- libcxx/test/std/re/re.traits/isctype.pass.cpp
+++ libcxx/test/std/re/re.traits/isctype.pass.cpp
@@ -6,8 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// XFAIL: LIBCXX-AIX-FIXME
-
// <regex>
// template <class charT> struct regex_traits;
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -492,7 +492,11 @@
static const mask punct = _ISPUNCT;
static const mask xdigit = _ISXDIGIT;
static const mask blank = _ISBLANK;
+# if defined(_AIX)
+ static const mask __regex_word = 0x8000;
+# else
static const mask __regex_word = 0x80;
+# endif
#elif defined(_NEWLIB_VERSION)
// Same type as Newlib's _ctype_ array in newlib/libc/include/ctype.h.
typedef char mask;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129862.444985.patch
Type: text/x-patch
Size: 1423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220715/d9884418/attachment.bin>
More information about the libcxx-commits
mailing list