Revert "Add guard to YY_NO_UNISTD_H definition."

This reverts commit f1ebbe6eba.

Revert "Set never-interactive option in lexers so that Flex doesn't use isatty() function from unistd."

This reverts commit c046bb88e5.

see ticket:2444 for more info.
close ticket:2444
master
buginator 2011-01-30 01:32:06 -05:00
parent fb626e0b59
commit 87c9f38dc3
10 changed files with 9 additions and 12 deletions

View File

@ -123,7 +123,10 @@ 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)
{

View File

@ -80,7 +80,7 @@ extern void res_set_debug(int bdebug);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option prefix="res_"
%x COMMENT

View File

@ -84,7 +84,7 @@ extern void strres_set_debug(int bdebug);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option prefix="strres_"
%x COMMENT

View File

@ -587,10 +587,6 @@
#define PATH_MAX 4096
#endif
// Tell Flex not to include unistd when it is not present.
#if !defined(HAVE_UNISTD_H) && !defined(YY_NO_UNISTD_H)
# define YY_NO_UNISTD_H
#endif
#if !defined(WZ_C99) && !defined(va_copy)
/**

View File

@ -84,7 +84,7 @@ extern void audp_set_extra(YY_EXTRA_TYPE user_defined);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option prefix="audp_"
%x COMMENT

View File

@ -80,7 +80,6 @@ static SDWORD playerIndex;
%option prefix="chat_"
%option nounput
%option case-insensitive
%option never-interactive
%%

View File

@ -458,7 +458,6 @@ static void pushInclude(const char *pIncludePath)
%option prefix="scr_"
%option nounput
%option yylineno
%option never-interactive
%x COMMENT
%x SLCOMMENT

View File

@ -87,7 +87,7 @@ extern void lev_set_extra(YY_EXTRA_TYPE user_defined);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option prefix="lev_"
%x COMMENT

View File

@ -79,7 +79,7 @@ extern void message_set_debug(int bdebug);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option prefix="message_"
%x COMMENT

View File

@ -92,7 +92,7 @@ extern void scrv_set_extra(YY_EXTRA_TYPE user_defined);
%}
%option yylineno noyywrap nounput never-interactive
%option yylineno noyywrap nounput
%option warn nodefault
%option prefix="scrv_"