diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l index ba8aea696..15f707766 100644 --- a/hw/xwin/winprefslex.l +++ b/hw/xwin/winprefslex.l @@ -37,14 +37,10 @@ #include #include "winprefsyacc.h" -extern YYSTYPE yylval; -extern char *yytext; extern int yyparse(void); extern void ErrorF (const char* /*f*/, ...); -int yylineno; - /* Copy the parsed string, must be free()d in yacc parser */ static char *makestr(char *str) { @@ -62,6 +58,9 @@ static char *makestr(char *str) %} %option yylineno +%option nounput +%option noinput +%option never-interactive %% \#.*[\r\n] { /* comment */ return NEWLINE; } diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 0acf160e4..19c2f4067 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -37,6 +37,7 @@ #endif #include #include +#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ #include #include "winprefs.h" @@ -80,7 +81,6 @@ static void CloseSysMenu(void); static int yyerror (char *s); -extern void ErrorF (const char* /*f*/, ...); extern char *yytext; extern int yylex(void);