Let us try this again, leave the never-interactive option for the lexers.
Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd. Define YY_NO_UNISTD_H when no unistd.h is detected. Remove attempt to fix isatty error on Windows introduced inmaster2f780609
. cherry picked from commitc046bb88e5
parent
ab118527f0
commit
31502ccdce
|
@ -123,10 +123,7 @@ extern UDWORD HashStringIgnoreCase( const char *String );
|
|||
|
||||
struct timezone;
|
||||
extern int gettimeofday(struct timeval* tv, struct timezone* tz);
|
||||
|
||||
extern "C" int isatty(int); // Apparently flex declares isatty with C++ linkage on Windows. Don't ask why. Declaring here instead.
|
||||
#endif
|
||||
extern "C" int isatty(int); // Apparently flex declares isatty with C++ linkage on Windows. Don't ask why. Declaring here instead.
|
||||
|
||||
static inline WZ_DECL_CONST const char * bool2string(bool var)
|
||||
{
|
||||
|
|
|
@ -80,7 +80,7 @@ extern void res_set_debug(int bdebug);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option prefix="res_"
|
||||
|
||||
%x COMMENT
|
||||
|
|
|
@ -84,7 +84,7 @@ extern void strres_set_debug(int bdebug);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option prefix="strres_"
|
||||
|
||||
%x COMMENT
|
||||
|
|
|
@ -84,7 +84,7 @@ extern void audp_set_extra(YY_EXTRA_TYPE user_defined);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option prefix="audp_"
|
||||
|
||||
%x COMMENT
|
||||
|
|
|
@ -80,6 +80,7 @@ static SDWORD playerIndex;
|
|||
%option prefix="chat_"
|
||||
%option nounput
|
||||
%option case-insensitive
|
||||
%option never-interactive
|
||||
|
||||
%%
|
||||
|
||||
|
|
|
@ -458,6 +458,7 @@ static void pushInclude(const char *pIncludePath)
|
|||
%option prefix="scr_"
|
||||
%option nounput
|
||||
%option yylineno
|
||||
%option never-interactive
|
||||
|
||||
%x COMMENT
|
||||
%x SLCOMMENT
|
||||
|
|
|
@ -87,7 +87,7 @@ extern void lev_set_extra(YY_EXTRA_TYPE user_defined);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option prefix="lev_"
|
||||
|
||||
%x COMMENT
|
||||
|
|
|
@ -79,7 +79,7 @@ extern void message_set_debug(int bdebug);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option prefix="message_"
|
||||
|
||||
%x COMMENT
|
||||
|
|
|
@ -92,7 +92,7 @@ extern void scrv_set_extra(YY_EXTRA_TYPE user_defined);
|
|||
|
||||
%}
|
||||
|
||||
%option yylineno noyywrap nounput
|
||||
%option yylineno noyywrap nounput never-interactive
|
||||
%option warn nodefault
|
||||
%option prefix="scrv_"
|
||||
|
||||
|
|
Loading…
Reference in New Issue