From 50274111341e82e1f26b1f3316042e5fe610ec8a Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 2 Jun 2008 21:43:31 +0900 Subject: gallium: More tweaks for the cosf/sinf logic. --- src/gallium/include/pipe/p_util.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/gallium/include') diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h index 0a9e2ef1b6..5547e57833 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 -- cgit v1.2.3