From 16db44b67df7ec3e3f5bcd5e1337b12ea4f69e57 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 17 Dec 2017 16:22:39 +0100 Subject: [PATCH] STYLE: add flex major version in '#if' conditional --- .../utilities/mesh/conversion/ansysToFoam/ansysToFoam.L | 3 +-- .../mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L | 2 +- .../mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L | 2 +- .../utilities/mesh/conversion/gambitToFoam/gambitToFoam.L | 2 +- .../chemistryReaders/chemkinReader/chemkinLexer.L | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 544789b29f..48ae6c1555 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -75,11 +75,10 @@ PtrList> slPatchCellFaces; Map cellTypes; 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_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && 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 cf6a6ea929..f96c1c95ef 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -126,7 +126,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_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && 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 59a2d56fc6..9505fae630 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_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && 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 05281cdb53..fcc853807c 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -82,7 +82,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_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && 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 80379ff868..0909813395 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_MINOR_VERSION < 6 && YY_FLEX_SUBMINOR_VERSION < 34 +#if YY_FLEX_MAJOR_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() #else int yyFlexLexer::yywrap()