diff options
author | Chia-I Wu <[email protected]> | 2011-08-05 12:50:12 +0900 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-08-21 02:01:48 +0800 |
commit | cd893ccba9b7e4bafbdbbb71f79d1b40bcef01a8 (patch) | |
tree | 3266a0bb835ef3151e92d1973456033fbaf2ec6d /src/gallium/auxiliary/util/u_math.h | |
parent | 31753b50f3927ab45f8442cbe687bab9cee6d3bc (diff) |
gallium: add PIPE_OS_ANDROID support
Android uses Linux kernel and its own C runtime. It resembles
PIPE_OS_LINUX a lot with some minor exceptions.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_math.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_math.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 0b5284428eb..46d9322932a 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -199,6 +199,16 @@ roundf(float x) #endif /* _MSC_VER */ +#ifdef PIPE_OS_ANDROID + +static INLINE +double log2(double d) +{ + return log(d) * (1.0 / M_LN2); +} + +#endif + @@ -409,7 +419,7 @@ unsigned ffs( unsigned u ) return i; } -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) || defined(PIPE_OS_ANDROID) #define ffs __builtin_ffs #endif |