aports/community/spim/flex-2.6-compat.patch

20 lines
846 B
Diff

spim-8.0 doesn't work with fex >= 2.6.0 [0]. This patch has been
applied upstream [1] and fixes this bug.
[0]: https://sourceforge.net/p/spimsimulator/bugs/66/
[1]: https://sourceforge.net/p/spimsimulator/code/679/
diff -upr spim-8.0.orig/CPU/scanner.l spim-8.0/CPU/scanner.l
--- spim-8.0.orig/CPU/scanner.l 2018-10-25 17:34:20.381424484 +0200
+++ spim-8.0/CPU/scanner.l 2018-10-25 17:34:33.554843193 +0200
@@ -316,7 +316,8 @@ initialize_scanner (FILE *in_file)
yyin = in_file;
#ifdef FLEX_SCANNER
yyrestart(in_file);
-#if (YY_FLEX_MAJOR_VERSION==2 && YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33)
+#define YY_FLEX_VERSION (YY_FLEX_MAJOR_VERSION * 1000 + YY_FLEX_MINOR_VERSION * 100 + YY_FLEX_SUBMINOR_VERSION)
+#if YY_FLEX_VERSION >= 2533
/* flex 2.5.33 flipped the polarity of this flag (sigh) */
yy_init = 0;
#else