[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V2] localename: Implement gl_locale_name_thread_unsafe() for Andr
From: |
Kevin Cernekee |
Subject: |
[PATCH V2] localename: Implement gl_locale_name_thread_unsafe() for Android |
Date: |
Mon, 16 Feb 2015 15:05:24 -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 | 5 +++++
lib/localename.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9b84dac..58fd8ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,11 @@
they will be able to create a file descriptor numbered
(getdtablesize()-1), and will fail if rlim_max > rlim_cur.
+ 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-11 Pádraig Brady <address@hidden>
tests: avoid recent -Werror=unused-variable regression in test-locale
diff --git a/lib/localename.c b/lib/localename.c
index c6f326e..f3733eb 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
}
}
--
1.9.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH V2] localename: Implement gl_locale_name_thread_unsafe() for Android,
Kevin Cernekee <=