From: Paul Berry Date: Thu, 17 Oct 2013 20:47:35 +0000 (-0700) Subject: glsl: Fix MSVC build (missing strcasecmp()) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b08195faec1bc31aed8b5c59419ac060b7e0b34e;p=mesa.git glsl: Fix MSVC build (missing strcasecmp()) MSVC doesn't have a strcasecmp() function; it uses _stricmp() instead. Reviewed-by: Jose Fonseca --- diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index ba2dc63b525..00589e28ea2 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -66,8 +66,14 @@ static bool match_layout_qualifier(const char *s1, const char *s2, */ if (state->es_shader) return strcmp(s1, s2); - else + else { +#if defined(_MSC_VER) + /* MSVC doesn't have a strcasecmp() function; instead it has _stricmp. */ + return _stricmp(s1, s2); +#else return strcasecmp(s1, s2); +#endif + } } %}