Mesa (master): mesa: VS 2013 does not provide strcasecmp.

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


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

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

mesa: VS 2013 does not provide strcasecmp.

A define is necessary, like for earlier VS versions.

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

---

 src/mesa/main/imports.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 17a9bd0..af780b2 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -126,7 +126,8 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
 #define atanhf(f) ((float) atanh(f))
 #endif
 
-#if defined(_MSC_VER) && (_MSC_VER < 1800)  /* Not req'd on VS2013 and above */
+#if defined(_MSC_VER)
+#if _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; }
@@ -135,6 +136,7 @@ static inline float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
 static inline float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
 static inline int isblank(int ch) { return ch == ' ' || ch == '\t'; }
 #define strtoll(p, e, b) _strtoi64(p, e, b)
+#endif /* _MSC_VER < 1800 */
 #define strcasecmp(s1, s2) _stricmp(s1, s2)
 #endif
 /*@}*/




More information about the mesa-commit mailing list