libc++: support newlib's ctype
Summary: Newlib supports ctype differently from other platforms, this patch teaches libc++ about yet another platform that does ctype differently. Reviewers: jroelofs Subscribers: cfe-commits, danalbert, EricWF, jvoung, jfb, mclow.lists Differential Revision: http://reviews.llvm.org/D7888 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230557 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1033,6 +1033,9 @@ ctype<char>::classic_table() _NOEXCEPT
|
||||
// going to end up dereferencing it later...
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
return *__ctype_b_loc();
|
||||
#elif defined(_NEWLIB_VERSION)
|
||||
// Newlib has a 257-entry table in ctype_.c, where (char)0 starts at [1].
|
||||
return _ctype_ + 1;
|
||||
#elif defined(_AIX)
|
||||
return (const unsigned int *)__lc_ctype_ptr->obj->mask;
|
||||
#elif defined(__ANDROID__)
|
||||
|
Reference in New Issue
Block a user