From: José Fonseca Date: Mon, 2 Jun 2008 12:43:31 +0000 (+0900) Subject: gallium: More tweaks for the cosf/sinf logic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50274111341e82e1f26b1f3316042e5fe610ec8a;p=mesa.git gallium: More tweaks for the cosf/sinf logic. --- 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