diff --git a/src/ExprIntrp/ExprIntrp.lex b/src/ExprIntrp/ExprIntrp.lex index 53742889fe..1685364e46 100644 --- a/src/ExprIntrp/ExprIntrp.lex +++ b/src/ExprIntrp/ExprIntrp.lex @@ -49,6 +49,9 @@ int yywrap() #include #include +// Avoid includion of unistd.h if parser is generated on Linux (flex 2.5.35) +#define YY_NO_UNISTD_H + // disable MSVC warnings in flex 2.89 code #pragma warning(disable:4131 4244 4273 4127) #endif diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index f6571e1295..ada8492b97 100644 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -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