Mesa (master): util: don't define isfinite(), isnan() for MSVC >= 1800
Brian Paul
brianp at kemper.freedesktop.org
Mon Mar 3 20:07:20 UTC 2014
Module: Mesa
Branch: master
Commit: bf2566032589e0c46dbd4ddef0d75d354d2a16b5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf2566032589e0c46dbd4ddef0d75d354d2a16b5
Author: Hans <hans at chromium.org>
Date: Sat Mar 1 11:26:09 2014 -0700
util: don't define isfinite(), isnan() for MSVC >= 1800
Signed-off-by: Brian Paul <brianp at vmware.com>
Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
---
src/gallium/auxiliary/util/u_math.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index ffbcc4c..ec03e4e 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -112,10 +112,13 @@ static INLINE float logf( float f )
#define logf(x) ((float)log((double)(x)))
#endif /* logf */
+#if _MSC_VER < 1800
#define isfinite(x) _finite((double)(x))
#define isnan(x) _isnan((double)(x))
+#endif /* _MSC_VER < 1800 */
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
+#if _MSC_VER < 1800
static INLINE double log2( double x )
{
const double invln2 = 1.442695041;
@@ -133,6 +136,7 @@ roundf(float x)
{
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
}
+#endif
#define INFINITY (DBL_MAX + DBL_MAX)
#define NAN (INFINITY - INFINITY)
More information about the mesa-commit
mailing list