Fix for building lex scanners on Windows when scanner is generated by flex 2.5.35 on Linux

This commit is contained in:
abv
2014-04-09 14:26:37 +04:00
committed by bugmaster
parent 0fbfbd6029
commit f58f9b92cb
2 changed files with 10 additions and 1 deletions

View File

@@ -40,9 +40,15 @@ void rec_typarg(int argtype);
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
{ if (modcom == 0) rec_restext(yytext,yyleng); }
// disable MSVC warnings in flex code
// MSVC specifics
#ifdef _MSC_VER
// disable MSVC warnings in flex code
#pragma warning(disable:4131 4244 4273 4267 4127)
// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35)
#define YY_NO_UNISTD_H
#endif
// disable GCC warnings in flex code