From: Dan Albert Date: Thu, 31 Jul 2014 21:04:08 +0000 (+0000) Subject: Make Android's ctype_base::mask unsigned. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea32c105a6959a503720e1c5a39e058cadfeef33;p=platform%2Fupstream%2Fllvm.git Make Android's ctype_base::mask unsigned. Keeping the regex code sane is much easier if we match the other platforms and use an unsigned mask. llvm-svn: 214442 --- diff --git a/libcxx/include/__locale b/libcxx/include/__locale index c5c0787..5ccd795 100644 --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -356,7 +356,7 @@ public: #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; #elif defined(__ANDROID__) - typedef char mask; + typedef unsigned char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 148fe42..e626528 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -1038,7 +1038,7 @@ ctype::classic_table() _NOEXCEPT #elif defined(_AIX) return (const unsigned int *)__lc_ctype_ptr->obj->mask; #elif defined(__ANDROID__) - return _ctype_ + 1; + return reinterpret_cast(_ctype_) + 1; #else // Platform not supported: abort so the person doing the port knows what to // fix