[PATCH] libgst: Do not re-define yylineno with newer versions of flex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] libgst: Do not re-define yylineno with newer versions of flex

Holger Freyther
From: Holger Hans Peter Freyther <[hidden email]>

With flex 2.6.0 the minor version is < 31 and one would end with
redefining the yylineno. Make the check more specific.

2016-09-18  Holger Hans Peter Freyther  <[hidden email]>

        * genbc-scan.l: Compile with flex 2.6.0.
        * genpr-scan.l: Compile with flex 2.6.0.
        * genvm-scan.l: Compile with flex 2.6.0.
---
 libgst/ChangeLog    | 6 ++++++
 libgst/genbc-scan.l | 2 +-
 libgst/genpr-scan.l | 2 +-
 libgst/genvm-scan.l | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index 3e513de..999aed9 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-18  Holger Hans Peter Freyther  <[hidden email]>
+
+ * genbc-scan.l: Compile with flex 2.6.0.
+ * genpr-scan.l: Compile with flex 2.6.0.
+ * genvm-scan.l: Compile with flex 2.6.0.
+
 2015-11-07  Holger Hans Peter Freyther  <[hidden email]>
 
  * interp.inl: Add alternative mul_with_check implementation.
diff --git a/libgst/genbc-scan.l b/libgst/genbc-scan.l
index 86169e6..68b78fb 100644
--- a/libgst/genbc-scan.l
+++ b/libgst/genbc-scan.l
@@ -70,7 +70,7 @@
 static Filament *literal_fil;
 static int from = 0, depth = 0;
 
-#if !defined YY_FLEX_SUBMINOR_VERSION || YY_FLEX_SUBMINOR_VERSION < 31
+#if !defined YY_FLEX_SUBMINOR_VERSION || (YY_FLEX_MAJORY_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 31)
 int yylineno = 1;
 #endif
 
diff --git a/libgst/genpr-scan.l b/libgst/genpr-scan.l
index cbdff7a..09bf7ae 100644
--- a/libgst/genpr-scan.l
+++ b/libgst/genpr-scan.l
@@ -64,7 +64,7 @@
 #include "genpr-parse.h"
 
 static int from = 0, depth = 0;
-#if !defined YY_FLEX_SUBMINOR_VERSION || YY_FLEX_SUBMINOR_VERSION < 31
+#if !defined YY_FLEX_SUBMINOR_VERSION || (YY_FLEX_MAJORY_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 31)
 int yylineno = 1;
 #endif
 
diff --git a/libgst/genvm-scan.l b/libgst/genvm-scan.l
index 3c8b35d..002e292 100644
--- a/libgst/genvm-scan.l
+++ b/libgst/genvm-scan.l
@@ -65,7 +65,7 @@
 #include "genvm-parse.h"
 
 static int from = 0, depth = 0;
-#if !defined YY_FLEX_SUBMINOR_VERSION || YY_FLEX_SUBMINOR_VERSION < 31
+#if !defined YY_FLEX_SUBMINOR_VERSION || (YY_FLEX_MAJORY_VERSION <= 2 && YY_FLEX_MINOR_VERSION <= 5 && YY_FLEX_SUBMINOR_VERSION < 31)
 int yylineno = 1;
 #endif
 %}
--
2.9.2


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk