gallium: Use costum log2 for all windows builds.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 17 Nov 2008 07:40:21 +0000 (16:40 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 17 Nov 2008 13:29:24 +0000 (22:29 +0900)
src/gallium/auxiliary/util/u_math.h

index ac11d7001bcc55b6705568d328ed55f5abb98733..1ae3234423a7f41882cf4b4398b472087baed614 100644 (file)
@@ -119,6 +119,7 @@ __inline double __cdecl atan2(double val)
 
 
 #if defined(_MSC_VER) 
+
 #if _MSC_VER < 1400 && !defined(__cplusplus) || defined(PIPE_SUBSYSTEM_WINDOWS_CE)
  
 static INLINE float cosf( float f ) 
@@ -161,12 +162,6 @@ static INLINE float logf( float f )
    return (float) log( (double) f );
 }
 
-static INLINE double log2( double x )
-{
-   const double invln2 = 1.442695041;
-   return log( x ) * invln2;
-}
-
 #else
 /* Work-around an extra semi-colon in VS 2005 logf definition */
 #ifdef logf
@@ -174,6 +169,13 @@ static INLINE double log2( double x )
 #define logf(x) ((float)log((double)(x)))
 #endif /* logf */
 #endif
+
+static INLINE double log2( double x )
+{
+   const double invln2 = 1.442695041;
+   return log( x ) * invln2;
+}
+
 #endif /* _MSC_VER */