From bf850f6799e505e6d1735540e68e01c6b18ef22f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 6 Jan 2013 12:41:07 +0200 Subject: Streamline a bit for Android Change-Id: I8233f6409d75bff23738e121efcdbd340035da9d --- sal/osl/unx/nlsupport.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sal/osl/unx') 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 -- cgit