[libc++] Fix __regex_word value when using newlib/picolibc
The ctype mask for newlib/picolibc is fully saturated, so __regex_word has to overlap with one of the values. This commit uses the same workaround as bionic did (uint16_t for char_class_type inside regex_traits). It should be possible to have libc++ provide the default rune table instead, but that will require a new mechanism to detect newlib inside __config since the header defining the newlib/picolibc macros has not been included yet inside __config. Doing it this way also avoids duplicating the ctype table for newlib, reducing the global data size. Differential Revision: https://reviews.llvm.org/D138195
Loading
Please sign in to comment