[Mesa-dev] [PATCH] mesa/imports.h: VS2013 doesn't provide strcasecmp

Alon Levy alon at pobox.com
Thu Jul 24 04:12:11 PDT 2014


From: Alon Levy <alevy at redhat.com>

Fixed build error at glsl_parser.yy for Visual Studio 2013

Signed-off-by: Alon Levy <alevy at redhat.com>
---
Thanks for the review. I verified and VS2013 (vs12) doesn't include strcasecmp,
I corrected the file you mentioned, here is a better patch. (this supercedes
the previous patch)

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

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 9e221cc..06b460d 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -141,6 +141,9 @@ 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
+
+#if defined(_MSC_VER)
 #define strcasecmp(s1, s2) _stricmp(s1, s2)
 #endif
 /*@}*/
-- 
1.9.3



More information about the mesa-dev mailing list