]> Savannah Git Hosting - gnulib.git/commitdiff
localename: Implement gl_locale_name_thread_unsafe for Android
authorKevin Cernekee <cernekee@google.com>
Tue, 17 Feb 2015 01:26:49 +0000 (17:26 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 17 Feb 2015 05:40:48 +0000 (21:40 -0800)
* 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
lib/localename.c

index c794541815fcaa3dff18b810e2615f1dd5b8826d..b198739dabc7e9a10ed1cc08abee9bbb2d2e6614 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-16  Kevin Cernekee  <cernekee@google.com>
+
+       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  <kdudka@redhat.com>
 
        fts: avoid crash when a cycle is added while traversing
index c6f326e5bd2ae4b1ff095b09274f33ec4731529c..f3733eb46c542ab4aae8f69fb16f72f866d65d11 100644 (file)
@@ -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
       }
   }