1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00

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

@ -49,6 +49,9 @@ int yywrap()
#include <stdlib.h> #include <stdlib.h>
#include <io.h> #include <io.h>
// 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 // disable MSVC warnings in flex 2.89 code
#pragma warning(disable:4131 4244 4273 4127) #pragma warning(disable:4131 4244 4273 4127)
#endif #endif

View File

@ -40,9 +40,15 @@ void rec_typarg(int argtype);
void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */ void resultat () /* Resultat alloue dynamiquement, "jete" une fois lu */
{ if (modcom == 0) rec_restext(yytext,yyleng); } { if (modcom == 0) rec_restext(yytext,yyleng); }
// disable MSVC warnings in flex code // MSVC specifics
#ifdef _MSC_VER #ifdef _MSC_VER
// disable MSVC warnings in flex code
#pragma warning(disable:4131 4244 4273 4267 4127) #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 #endif
// disable GCC warnings in flex code // disable GCC warnings in flex code