From 47faa3bad1e0c09a5740236f3b7e63c02d55757b Mon Sep 17 00:00:00 2001 From: wyldckat Date: Thu, 25 Aug 2016 19:11:41 +0100 Subject: [PATCH] Updated .L files to assign properly the function 'yywrap()' for Flex 2.6.0 and newer. Nonetheless, keep in mind that this isn't general enough, since this will again have future issues with Flex 3.0, if and when that time comes. Note: Used the same fix from OpenFOAM-dev, commit a4eabffbacfa8e4648f044e3d4c2a74d722a2b47. --- .../utilities/mesh/conversion/ansysToFoam/ansysToFoam.L | 8 ++++---- .../conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L | 8 ++++---- .../conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L | 2 +- .../mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L | 2 +- .../utilities/mesh/conversion/gambitToFoam/gambitToFoam.L | 8 ++++---- .../preProcessing/fluentDataToFoam/fluentDataToFoam.L | 2 +- .../triSurface/triSurface/interfaces/STL/readSTLASCII.L | 8 ++++---- src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L | 2 +- .../chemistryReaders/chemkinReader/chemkinLexer.L | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index fb6cd4557..85c8e4199 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -77,11 +77,11 @@ label currentTypei = -1; // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -// #if YY_FLEX_SUBMINOR_VERSION < 34 -// extern "C" int yywrap() -// #else +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +extern "C" int yywrap() +#else int yyFlexLexer::yywrap() -// #endif +#endif { return 1; } diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L index 153b917bf..da5115660 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L @@ -125,11 +125,11 @@ void uniquify(word& name, HashSet& patchNames) // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -// #if YY_FLEX_SUBMINOR_VERSION < 34 -// extern "C" int yywrap() -// #else +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +extern "C" int yywrap() +#else int yyFlexLexer::yywrap() -// #endif +#endif { return 1; } diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 4a6eaad20..766b26dd7 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -124,7 +124,7 @@ void uniquify(word& name, HashSet& patchNames) // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap() diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 30ed08386..934bdd18c 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -103,7 +103,7 @@ wordList patchNameIDs(maxZoneID); // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap() diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 513d21ec0..fcb70223d 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -81,11 +81,11 @@ label nValuesForPatchFaces = 0; // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -// #if YY_FLEX_SUBMINOR_VERSION < 34 -// extern "C" int yywrap() -// #else +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +extern "C" int yywrap() +#else int yyFlexLexer::yywrap() -// #endif +#endif { return 1; } diff --git a/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L b/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L index a0051bcdb..7b632eb56 100644 --- a/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L +++ b/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L @@ -77,7 +77,7 @@ SLPtrList > zoneData; // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap() diff --git a/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L index 0792dd56e..a63fc7c04 100644 --- a/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -53,11 +53,11 @@ int yyFlexLexer::yylex() // It is called by yylex but is not used as the mechanism to change file. // See <> //! @cond dummy -// #if YY_FLEX_SUBMINOR_VERSION < 34 -// extern "C" int yywrap() -// #else +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +extern "C" int yywrap() +#else int yyFlexLexer::yywrap() -// #endif +#endif { return 1; } diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L index ecb74e7c1..e392ef8f6 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L @@ -50,7 +50,7 @@ int yyFlexLexer::yylex() // It is called by yylex but is not used as the mechanism to change file. // See <> //! @cond dummy -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap() diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index 466d8e017..23dfca728 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -54,7 +54,7 @@ int yyFlexLexer::yylex() // It is called by yylex but is not used as the mechanism to change file. // See <> //! @cond dummy -#if YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap()