From dc700f1239a92c8b27cadaccfc7e2539864a6164 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Sun, 16 Dec 2018 09:18:26 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349293 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/regex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/regex b/include/regex index 18585003a..bd83d7c10 100644 --- a/include/regex +++ b/include/regex @@ -990,6 +990,10 @@ public: #if defined(__mips__) && defined(__GLIBC__) static const char_class_type __regex_word = static_cast(_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