summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2008-06-02 21:43:31 +0900
committerJosé Fonseca <[email protected]>2008-06-02 21:43:31 +0900
commit50274111341e82e1f26b1f3316042e5fe610ec8a (patch)
tree09e77695bd2bd38104ab85231e6c6a7b9a45bfa3 /src/gallium/include/pipe
parentaa1a39d1a742c1bb346ba14814d6bf7b44e646cb (diff)
gallium: More tweaks for the cosf/sinf logic.
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_util.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index 0a9e2ef1b6b..5547e578333 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -410,8 +410,9 @@ extern void pipe_copy_rect(ubyte * dst, unsigned cpp, unsigned dst_pitch,
-#if defined(_MSC_VER) && !defined(__cplusplus)
-
+#if defined(_MSC_VER)
+#if _MSC_VER < 1400 && !defined(__cplusplus)
+
static INLINE float cosf( float f )
{
return (float) cos( (double) f );
@@ -452,7 +453,14 @@ static INLINE float logf( float f )
return (float) log( (double) f );
}
+#else
+/* Work-around an extra semi-colon in VS 2005 logf definition */
+#ifdef logf
+#undef logf
+#define logf(x) ((float)log((double)(x)))
+#endif /* logf */
#endif
+#endif /* _MSC_VER */
#ifdef __cplusplus