[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

Michał Górny via Phabricator reviews at reviews.llvm.org
Thu Dec 13 09:08:44 PST 2018


mgorny created this revision.
mgorny added reviewers: krytarowski, howard.hinnant, dsanders, EricWF.
Herald added subscribers: libcxx-commits, ldionne.

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.


Repository:
  rCXX libc++

https://reviews.llvm.org/D55657

Files:
  include/regex


Index: include/regex
===================================================================
--- include/regex
+++ include/regex
@@ -990,6 +990,9 @@
 
 #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
+    static const char_class_type __regex_word = 0x8000;
 #else
     static const char_class_type __regex_word = 0x80;
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55657.178079.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181213/e0ed755f/attachment.bin>


More information about the libcxx-commits mailing list