summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2011-03-04 12:49:55 +0000
committerJosé Fonseca <jfonseca@vmware.com>2011-03-04 12:49:55 +0000
commitf52660c3dc85632b4dce76d16bf6d78266c35173 (patch)
treee4c64d6d6f58f29227879af26e212a77673f2dfa /src
parentd40b868db5b82529cbe07598b2ebef23cc31a7fa (diff)
glsl: Define YY_NO_UNISTD_H on MSVC.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/glcpp/glcpp-lex.l4
-rw-r--r--src/glsl/glsl_lexer.ll4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
index 68e44eb790..8661887088 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 e4c469f9e0..cfd8926175 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; \