Alexandre Julliard : Avoid the nounistd option that doesn' t exist on older flex, define YY_NO_UNISTD_H instead.
Alexandre Julliard
julliard at winehq.org
Tue Feb 19 08:54:56 CST 2008
Module: wine
Branch: master
Commit: 41fbacefa1ce573c14cdc147caf7771ad4bb8c15
URL: http://source.winehq.org/git/wine.git/?a=commit;h=41fbacefa1ce573c14cdc147caf7771ad4bb8c15
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Feb 19 15:42:49 2008 +0100
Avoid the nounistd option that doesn't exist on older flex, define YY_NO_UNISTD_H instead.
---
libs/wpp/ppl.l | 5 ++++-
programs/winedbg/debug.l | 7 ++++++-
programs/winhelp/macro.lex.l | 10 ++++++++--
tools/widl/parser.l | 6 +++---
tools/wrc/parser.l | 7 ++++++-
5 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l
index 198fcdb..5c39dbb 100644
--- a/libs/wpp/ppl.l
+++ b/libs/wpp/ppl.l
@@ -128,7 +128,6 @@
%option 8bit never-interactive
%option nounput
%option prefix="ppy_"
-%option nounistd
%x pp_pp
%x pp_eol
@@ -164,6 +163,10 @@ ul [uUlL]|[uUlL][lL]|[lL][uU]|[lL][lL][uU]|[uU][lL][lL]|[lL][uU][lL]
#include <ctype.h>
#include <assert.h>
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
#include "wpp_private.h"
#include "ppy.tab.h"
diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l
index 6e6c888..a0512c1 100644
--- a/programs/winedbg/debug.l
+++ b/programs/winedbg/debug.l
@@ -19,13 +19,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-%option nounput interactive 8bit prefix="dbg_" nounistd
+%option nounput interactive 8bit prefix="dbg_"
%{
+#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
#include "debugger.h"
#include "dbg.tab.h"
diff --git a/programs/winhelp/macro.lex.l b/programs/winhelp/macro.lex.l
index 55e7ad6..97640b4 100644
--- a/programs/winhelp/macro.lex.l
+++ b/programs/winhelp/macro.lex.l
@@ -1,4 +1,4 @@
-%{
+%{ /* -*-C-*- */
/*
* Help Viewer
*
@@ -20,10 +20,16 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
%}
-%option nounput interactive 8bit nounistd
+%option nounput interactive 8bit
%x quote
%{
+#include "config.h"
#include <assert.h>
+
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
#include "macro.h"
#include "wine/debug.h"
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index a701453..af9445b 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -21,7 +21,6 @@
%option stack
%option nounput noyy_top_state
%option 8bit never-interactive prefix="parser_"
-%option nounistd
nl \r?\n
ws [ \f\t\r]
@@ -45,8 +44,9 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
#include <string.h>
#include <ctype.h>
#include <assert.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
+
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
#endif
#include "widl.h"
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index f4d0c19..1cae89a 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -87,7 +87,6 @@
%option nounput noyy_top_state noyywrap
%option 8bit never-interactive
%option prefix="parser_"
-%option nounistd
/* Some shortcut definitions */
ws [ \f\t\r]
@@ -97,12 +96,18 @@ cident [a-zA-Z_][0-9a-zA-Z_]*
/*#define LEX_DEBUG*/
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
+#ifndef HAVE_UNISTD_H
+#define YY_NO_UNISTD_H
+#endif
+
#include "wine/unicode.h"
#include "wrc.h"
#include "utils.h"
More information about the wine-cvs
mailing list