summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-04-17 17:42:46 -0700
committerDan Albert <danalbert@google.com>2014-04-18 15:55:14 +0000
commit2517f4fe31291c98c8120e78de0c7a299408bbf1 (patch)
tree07ee635f7039596a5b6fb2675963059283ab3bcd
parentc13109d44520ab0fe46901fb79702a1a915169c0 (diff)
downloadlibcxx_35a-2517f4fe31291c98c8120e78de0c7a299408bbf1.tar.gz
Fix classic_table implementation for bionic
Change-Id: I26716b16bddcfb7109f436822067950fd99a5c08
-rw-r--r--include/__locale4
-rw-r--r--src/locale.cpp2
2 files changed, 5 insertions, 1 deletions
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<char>::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