]> OCCT Git - occt-copy.git/commitdiff
Fix for building lex scanners on Windows when scanner is generated by flex 2.5.35...
authorabv <abv@opencascade.com>
Wed, 9 Apr 2014 10:26:37 +0000 (14:26 +0400)
committerbugmaster <bugmaster@opencascade.com>
Wed, 9 Apr 2014 11:07:37 +0000 (15:07 +0400)
src/ExprIntrp/ExprIntrp.lex
src/StepFile/step.lex

index 53742889fef5248b574348129bfa1c9e2595b009..1685364e46bb68b5d20e02f4289ef34618942313 100644 (file)
@@ -49,6 +49,9 @@ int yywrap()
 #include <stdlib.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
 #pragma warning(disable:4131 4244 4273 4127)
 #endif
index f6571e1295a042b5e4b86756a2e235d469670342..ada8492b9779c43e13767ee06b338ae65b157531 100644 (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