diff options
author | smcgruer <smcgruer@google.com> | 2015-06-09 10:18:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-09 10:18:50 -0700 |
commit | 1aca86490410434020eefd2a27ee61a002871391 (patch) | |
tree | fd19a5421a2577d8234982ed9d214fcbf0f9aeb8 /src/gpu/GrAutoLocaleSetter.h | |
parent | 257918898a2353e44a45234af48828f9dd6ccb6f (diff) |
Fix build for UCLIBC platforms (newlocale/freelocale)
UCLIBC does not have locale support by default.
BUG=skia:
Review URL: https://codereview.chromium.org/1162953003
Diffstat (limited to 'src/gpu/GrAutoLocaleSetter.h')
-rw-r--r-- | src/gpu/GrAutoLocaleSetter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrAutoLocaleSetter.h b/src/gpu/GrAutoLocaleSetter.h index dd17bbef68..3aa50c9d4d 100644 --- a/src/gpu/GrAutoLocaleSetter.h +++ b/src/gpu/GrAutoLocaleSetter.h @@ -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 |