Mesa (master): mesa: don't define c99 math functions for MSVC >= 1800

Brian Paul brianp at kemper.freedesktop.org
Mon Mar 3 20:07:20 UTC 2014


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

Author: Hans <hans at chromium.org>
Date:   Sat Mar  1 11:28:18 2014 -0700

mesa: don't define c99 math functions for MSVC >= 1800

Signed-off-by: Brian Paul <brianp at vmware.com>
Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>

---

 src/mesa/main/imports.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d79e2a3..9e221cc 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -132,7 +132,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
 #define atanhf(f) ((float) atanh(f))
 #endif
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && (_MSC_VER < 1800)  /* Not req'd on VS2013 and above */
 static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
 static inline float exp2f(float x) { return powf(2.0f, x); }
 static inline float log2f(float x) { return logf(x) * 1.442695041f; }




More information about the mesa-commit mailing list