util: work around freaky win32 math.h
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 13:19:15 +0000 (14:19 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 21 Apr 2008 13:19:15 +0000 (14:19 +0100)
src/gallium/include/pipe/p_util.h

index 77783b1..43d94ec 100644 (file)
@@ -405,6 +405,8 @@ extern void pipe_copy_rect(ubyte * dst, unsigned cpp, unsigned dst_pitch,
 
 #ifdef WIN32
 
+#if !defined(_INC_MATH) || !defined(__cplusplus)
+
 static INLINE float cosf( float f ) 
 {
    return (float) cos( (double) f );
@@ -444,7 +446,7 @@ static INLINE float logf( float f )
 {
    return (float) cos( (double) f );
 }
-
+#endif  /* _INC_MATH */
 #endif