From 2517f4fe31291c98c8120e78de0c7a299408bbf1 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 17 Apr 2014 17:42:46 -0700 Subject: Fix classic_table implementation for bionic Change-Id: I26716b16bddcfb7109f436822067950fd99a5c08 --- include/__locale | 4 +++- src/locale.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/__locale b/include/__locale index 2d994fd6..57a4cfea 100644 --- a/include/__locale +++ b/include/__locale @@ -343,13 +343,15 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; +#elif defined(__ANDROID__) + typedef char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; diff --git a/src/locale.cpp b/src/locale.cpp index afc96bd8..868c7582 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -1039,6 +1039,8 @@ ctype::classic_table() _NOEXCEPT return *__ctype_b_loc(); #elif defined(_AIX) return (const unsigned int *)__lc_ctype_ptr->obj->mask; +#elif defined(__ANDROID__) + return _ctype_; #else // Platform not supported: abort so the person doing the port knows what to // fix -- cgit v1.2.3