diff --git a/libs/wpp/ppl.l b/libs/wpp/ppl.l index 198fcdbae14..5c39dbb97e3 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 #include +#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 6e6c8884e30..a0512c12787 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 #include #include +#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 55e7ad6edfc..97640b4a46d 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 + +#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 a7014531397..af9445bafbc 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 #include #include -#ifdef HAVE_UNISTD_H -# include + +#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 f4d0c194145..1cae89aa2d9 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 #include #include #include #include +#ifndef HAVE_UNISTD_H +#define YY_NO_UNISTD_H +#endif + #include "wine/unicode.h" #include "wrc.h" #include "utils.h"