From f52660c3dc85632b4dce76d16bf6d78266c35173 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 4 Mar 2011 12:49:55 +0000 Subject: glsl: Define YY_NO_UNISTD_H on MSVC. --- src/glsl/glcpp/glcpp-lex.l | 4 ++++ src/glsl/glsl_lexer.ll | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 68e44eb7902..86618870885 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -34,6 +34,10 @@ int glcpp_get_column (yyscan_t yyscanner); void glcpp_set_column (int column_no , yyscan_t yyscanner); +#ifdef _MSC_VER +#define YY_NO_UNISTD_H +#endif + #define YY_NO_INPUT #define YY_USER_ACTION \ diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index e4c469f9e0a..cfd89261757 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -29,6 +29,10 @@ static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); +#ifdef _MSC_VER +#define YY_NO_UNISTD_H +#endif + #define YY_USER_ACTION \ do { \ yylloc->source = 0; \ -- cgit v1.2.3