[Mesa-dev] [PATCH] mesa/imports.h: VS2013 doesn't provide strcasecmp
Alon Levy
alon at pobox.com
Mon Jul 28 17:57:43 PDT 2014
On 07/24/2014 02:12 PM, Alon Levy wrote:
> 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>
Not required, my bad, I was looking at an old master, patch
8c879ac1977a265ae513a5569ee3af35dbc6b1aa already does this
> ---
> 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
> /*@}*/
>
More information about the mesa-dev
mailing list