summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-01-06 12:41:07 +0200
committerTor Lillqvist <tml@iki.fi>2013-01-06 16:13:16 +0200
commitbf850f6799e505e6d1735540e68e01c6b18ef22f (patch)
treebbbcf42855e8383772204e2649b76fa17b4fe087 /sal
parent4a11f5c28a2d7b4d50d67f26cba889169977a0ce (diff)
Streamline a bit for Android
Change-Id: I8233f6409d75bff23738e121efcdbd340035da9d
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/nlsupport.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index fd0e02466b64..b0f231f5c539 100644
--- a/sal/osl/unx/nlsupport.c
+++ b/sal/osl/unx/nlsupport.c
@@ -907,6 +907,12 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
void _imp_getProcessLocale( rtl_Locale ** ppLocale )
{
+#ifdef ANDROID
+ /* No locale environment variables on Android, so why even bother
+ * with getenv().
+ */
+ locale = "en-US.UTF-8";
+#else
/* simulate behavior off setlocale */
char * locale = getenv( "LC_ALL" );
@@ -917,13 +923,10 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
locale = getenv( "LANG" );
if( NULL == locale )
-#ifdef ANDROID
- locale = "en-US.UTF-8";
-#else
locale = "C";
-#endif
*ppLocale = _parse_locale( locale );
+#endif
}
#endif