[libcxx] r349293 - [regex] Use distinct __regex_word on NetBSD
Michal Gorny
mgorny at gentoo.org
Sun Dec 16 01:18:26 PST 2018
Author: mgorny
Date: Sun Dec 16 01:18:26 2018
New Revision: 349293
URL: http://llvm.org/viewvc/llvm-project?rev=349293&view=rev
Log:
[regex] Use distinct __regex_word on NetBSD
NetBSD defines character classes up to 0x2000. Use 0x8000 as a safe
__regex_word that hopefully will not collide with other values
in the foreseeable future.
Differential Revision: https://reviews.llvm.org/D55657
Modified:
libcxx/trunk/include/regex
Modified: libcxx/trunk/include/regex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/regex?rev=349293&r1=349292&r2=349293&view=diff
==============================================================================
--- libcxx/trunk/include/regex (original)
+++ libcxx/trunk/include/regex Sun Dec 16 01:18:26 2018
@@ -990,6 +990,10 @@ public:
#if defined(__mips__) && defined(__GLIBC__)
static const char_class_type __regex_word = static_cast<char_class_type>(_ISbit(15));
+#elif defined(__NetBSD__)
+ // NetBSD defines classes up to 0x2000
+ // see sys/ctype_bits.h, _CTYPE_Q
+ static const char_class_type __regex_word = 0x8000;
#else
static const char_class_type __regex_word = 0x80;
#endif
More information about the libcxx-commits
mailing list