OSDN Git Service

android: don't define the math functions
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 23 Jan 2015 12:02:17 +0000 (20:02 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 16 Jul 2015 13:48:42 +0000 (21:48 +0800)
They are all defined in Android bionic.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
src/mesa/main/imports.h

index 0fcba4f..f538c90 100644 (file)
@@ -95,6 +95,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
  */
 /*@{*/
 #if (!defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE < 600)) && !defined(_ISOC99_SOURCE) \
+   && !defined(ANDROID) \
    && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)) \
    && (!defined(_MSC_VER) || (_MSC_VER < 1400))
 #define acosf(f) ((float) acos(f))
@@ -108,13 +109,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
 #define exp2f(f) ((float) exp2(f))
 #define floorf(f) ((float) floor(f))
 #define logf(f) ((float) log(f))
-
-#ifdef ANDROID
-#define log2f(f) (logf(f) * (float) (1.0 / M_LN2))
-#else
 #define log2f(f) ((float) log2(f))
-#endif
-
 #define powf(x,y) ((float) pow(x,y))
 #define sinf(f) ((float) sin(f))
 #define sinhf(f) ((float) sinh(f))