summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2018-12-16 09:18:26 +0000
committerMichal Gorny <mgorny@gentoo.org>2018-12-16 09:18:26 +0000
commita25cd0c2da6bbaf9e0c30efc102f2343b15d618e (patch)
tree18b65175336168ae4682addeb82181fb91ddafbe /libcxx/include
parent40b46d7cb54f04176357f180294849b8f3e919ad (diff)
downloadbcm5719-llvm-a25cd0c2da6bbaf9e0c30efc102f2343b15d618e.tar.gz
bcm5719-llvm-a25cd0c2da6bbaf9e0c30efc102f2343b15d618e.zip
[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 llvm-svn: 349293
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/regex4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 18585003a8f..bd83d7c10ca 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -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
OpenPOWER on IntegriCloud