Mesa (master): util: Don't attempt to redefine INFINITY/NAN on VS 2013.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri May 2 21:06:32 UTC 2014


Module: Mesa
Branch: master
Commit: 7ebdc9e48c99a92475b48668284695663e871f7d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ebdc9e48c99a92475b48668284695663e871f7d

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu May  1 14:17:51 2014 +0100

util: Don't attempt to redefine INFINITY/NAN on VS 2013.

There are now provided by VS.

Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 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 */
 




More information about the mesa-commit mailing list