Mesa (master): mesa: Include <unistd.h> only when one is available.

Ian Romanick idr at kemper.freedesktop.org
Mon Dec 21 18:50:52 PST 2009


Module: Mesa
Branch: master
Commit: de7021b71c1920eeb181d430f2ae2463f964d7cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=de7021b71c1920eeb181d430f2ae2463f964d7cf

Author: Michal Krol <michal at vmware.com>
Date:   Mon Sep  7 09:31:17 2009 +0200

mesa: Include <unistd.h> only when one is available.
(cherry picked from commit 970823978c2f7d2cf0757aa6ddbd6289b34c476f)

---

 src/mesa/shader/lex.yy.c        |    4 ++++
 src/mesa/shader/program_lexer.l |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c
index fefef57..408ede6 100644
--- a/src/mesa/shader/lex.yy.c
+++ b/src/mesa/shader/lex.yy.c
@@ -913,6 +913,10 @@ static yyconst flex_int16_t yy_chk[1023] =
 #define require_rect   (yyextra->option.TexRect)
 #define require_texarray        (yyextra->option.TexArray)
 
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
 #define return_token_or_IDENTIFIER(condition, token)	\
    do {							\
       if (condition) {					\
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index c2803ff..ce4cb42 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -35,6 +35,10 @@
 #define require_rect   (yyextra->option.TexRect)
 #define require_texarray        (yyextra->option.TexArray)
 
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
 #define return_token_or_IDENTIFIER(condition, token)	\
    do {							\
       if (condition) {					\



More information about the mesa-commit mailing list