Browse Source

Fixed GLSL optimizer Android build.

bkaradzic 12 years ago
parent
commit
82d6813c5c

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/glsl_types.cpp

@@ -586,7 +586,7 @@ glsl_type::field_type(const char *name) const
    return error_type;
 }
 
-const glsl_precision
+glsl_precision
 glsl_type::field_precision(const char *name) const
 {
    if (this->base_type != GLSL_TYPE_STRUCT)

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/glsl_types.h

@@ -454,7 +454,7 @@ struct glsl_type {
     */
    const glsl_type *field_type(const char *name) const;
 
-   const glsl_precision field_precision(const char *name) const;
+   glsl_precision field_precision(const char *name) const;
 
 
    /**

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/ralloc.c

@@ -29,7 +29,7 @@
 #include <stdint.h>
 
 /* Android defines SIZE_MAX in limits.h, instead of the standard stdint.h */
-#ifdef ANDROID
+#if defined(__ANDROID__) || defined(ANDROID)
 #include <limits.h>
 #endif
 

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/strtod.c

@@ -45,7 +45,7 @@ double
 glsl_strtod(const char *s, char **end)
 {
 #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
-   !defined(__HAIKU__) && !defined(__UCLIBC__)
+   !defined(__HAIKU__) && !defined(__UCLIBC__) && !defined(__ANDROID__)
    static locale_t loc = NULL;
    if (!loc) {
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);

+ 1 - 1
3rdparty/glsl-optimizer/src/mesa/main/imports.h

@@ -114,7 +114,7 @@ typedef union { GLfloat f; GLint i; } fi_type;
 #define floorf(f) ((float) floor(f))
 #define logf(f) ((float) log(f))
 
-#ifdef ANDROID
+#if defined(__ANDROID__) || defined(ANDROID)
 #define log2f(f) (logf(f) * (float) (1.0 / M_LN2))
 #else
 #define log2f(f) ((float) log2(f))