From 56c5fe3e449d4c1c1c1a5f56c9320c56f65785bc 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. --- applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L | 2 +- .../utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L | 2 +- .../utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L | 2 +- .../utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L | 2 +- applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L | 2 +- .../utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L | 2 +- src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L | 2 +- src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L | 2 +- .../reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 8b1af5fcd..eefb0c66a 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -77,7 +77,7 @@ 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 +#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/fluent3DMeshToElmer/fluent3DMeshToElmer.L b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L index d352e522f..8853db395 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToElmer/fluent3DMeshToElmer.L @@ -125,7 +125,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/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index d977c836d..8ec08bbee 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 ddc0fe7ef..34b422f01 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 f5ad0f89d..00b02d24d 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -81,7 +81,7 @@ 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 +#if YY_FLEX_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap() diff --git a/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L b/applications/utilities/preProcessing/fluentDataToFoam/fluentDataToFoam.L index 10b9a524f..0ae99ef0d 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 6ce28bf91..941792c20 100644 --- a/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/meshTools/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -53,7 +53,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/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L index 674bc9903..877d3793d 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 112b9737f..c8206a0b7 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() -- 2.11.4.GIT