Mesa (master): mesa: Fix Android build by #ifdef'ing out locale support

Chad Versace chadversary at kemper.freedesktop.org
Tue Aug 16 14:05:53 PDT 2011


Module: Mesa
Branch: master
Commit: bd064a49f119d126623c0e85702801e4cee62187
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd064a49f119d126623c0e85702801e4cee62187

Author: Chad Versace <chad at chad-versace.us>
Date:   Mon Aug 15 13:26:21 2011 -0700

mesa: Fix Android build by #ifdef'ing out locale support

Bionic does not support locales. This commit #ifdef's out the locale usage
in _mesa_strtof().

Signed-off-by: Chad Versace <chad at chad-versace.us>

---

 src/mesa/main/imports.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 0a572ec..8f09719 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -753,7 +753,8 @@ _mesa_strdup( const char *s )
 float
 _mesa_strtof( const char *s, char **end )
 {
-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
+    !defined(ANDROID)
    static locale_t loc = NULL;
    if (!loc) {
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);



More information about the mesa-commit mailing list