From 7bf9a5ee1c0c16215e6ef06858f5870e86c6d7df Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Mon, 16 Feb 2015 17:26:49 -0800 Subject: [PATCH] localename: Implement gl_locale_name_thread_unsafe for Android * lib/localename.c: Android API level >= 21 supports two hardcoded locales: C (POSIX) and C.UTF-8. Distinguish them by checking the internal __locale_t struct. --- ChangeLog | 7 +++++++ lib/localename.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index c794541815..b198739dab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-02-16 Kevin Cernekee + + localename: Implement gl_locale_name_thread_unsafe for Android + * lib/localename.c: Android API level >= 21 supports two hardcoded + locales: C (POSIX) and C.UTF-8. Distinguish them by checking + the internal __locale_t struct. + 2015-02-16 Kamil Dudka fts: avoid crash when a cycle is added while traversing diff --git a/lib/localename.c b/lib/localename.c index c6f326e5bd..f3733eb46c 100644 --- a/lib/localename.c +++ b/lib/localename.c @@ -2730,6 +2730,8 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname) # elif defined __sun /* Solaris >= 12. */ return getlocalename_l (category, thread_locale); +# elif defined __ANDROID__ + return MB_CUR_MAX == 4 ? "C.UTF-8" : "C"; # endif } } -- 2.39.5