Fix build for UCLIBC platforms (newlocale/freelocale)

UCLIBC does not have locale support by default.

BUG=skia:

Review URL: https://codereview.chromium.org/1162953003
This commit is contained in:
smcgruer 2015-06-09 10:18:50 -07:00 committed by Commit bot
parent 257918898a
commit 1aca864904

View File

@ -28,7 +28,7 @@ public:
#if defined(SK_BUILD_FOR_WIN)
fOldPerThreadLocale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
fOldLocale = setlocale(LC_ALL, name);
#elif !defined(SK_BUILD_FOR_ANDROID)
#elif !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__)
fLocale = newlocale(LC_ALL, name, 0);
if (fLocale) {
fOldLocale = uselocale(fLocale);
@ -42,7 +42,7 @@ public:
#if defined(SK_BUILD_FOR_WIN)
setlocale(LC_ALL, fOldLocale);
_configthreadlocale(fOldPerThreadLocale);
#elif !defined(SK_BUILD_FOR_ANDROID)
#elif !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__)
if (fLocale) {
uselocale(fOldLocale);
freelocale(fLocale);
@ -54,7 +54,7 @@ private:
#if defined(SK_BUILD_FOR_WIN)
int fOldPerThreadLocale;
const char* fOldLocale;
#elif !defined(SK_BUILD_FOR_ANDROID)
#elif !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__)
locale_t fOldLocale;
locale_t fLocale;
#endif