[Mesa-dev] [PATCH 9/9] util: Don't attempt to redefine INFINITY/NAN on VS 2013.

jfonseca at vmware.com jfonseca at vmware.com
Fri May 2 08:11:56 PDT 2014


From: José Fonseca <jfonseca at vmware.com>

There are now provided by VS.
---
 src/gallium/auxiliary/util/u_math.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index a60e183..2ade64a 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -138,8 +138,13 @@ roundf(float x)
 }
 #endif
 
+#ifndef INFINITY
 #define INFINITY (DBL_MAX + DBL_MAX)
+#endif
+
+#ifndef NAN
 #define NAN (INFINITY - INFINITY)
+#endif
 
 #endif /* _MSC_VER */
 
-- 
1.9.1



More information about the mesa-dev mailing list