summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/patches/flex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/patches/flex.patch')
-rw-r--r--Build/source/utils/asymptote/patches/flex.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/patches/flex.patch b/Build/source/utils/asymptote/patches/flex.patch
new file mode 100644
index 00000000000..56a2d4d5c45
--- /dev/null
+++ b/Build/source/utils/asymptote/patches/flex.patch
@@ -0,0 +1,50 @@
+diff -u flex-2.5.39/gen.c flex-2.5.39J/gen.c
+--- flex-2.5.39/gen.c 2014-03-26 06:46:44.000000000 -0600
++++ flex-2.5.39J/gen.c 2014-04-26 10:52:30.962073096 -0600
+@@ -55,6 +55,14 @@
+ * 0 elements of its arrays, too.)
+ */
+
++static const char *get_yy_char_decl (void)
++{
++ return (gentables)
++ ? "static yyconst YY_CHAR %s[%d] =\n { 0,\n"
++ : "static yyconst YY_CHAR * %s = 0;\n";
++}
++
++
+ static const char *get_int16_decl (void)
+ {
+ return (gentables)
+@@ -465,7 +473,7 @@
+ register int i, j;
+ int numrows;
+
+- out_str_dec (get_int32_decl (), "yy_ec", csize);
++ out_str_dec (get_yy_char_decl (), "yy_ec", csize);
+
+ for (i = 1; i < csize; ++i) {
+ ecgroup[i] = ABS (ecgroup[i]);
+@@ -1271,7 +1279,7 @@
+ fputs (_("\n\nMeta-Equivalence Classes:\n"),
+ stderr);
+
+- out_str_dec (get_int32_decl (), "yy_meta", numecs + 1);
++ out_str_dec (get_yy_char_decl (), "yy_meta", numecs + 1);
+ buf_prints (&yydmap_buf,
+ "\t{YYTD_ID_META, (void**)&yy_meta, sizeof(%s)},\n",
+ "flex_int32_t");
+@@ -1516,11 +1524,11 @@
+ if (yymore_used && !yytext_is_array) {
+ indent_puts ("YY_G(yytext_ptr) -= YY_G(yy_more_len); \\");
+ indent_puts
+- ("yyleng = (size_t) (yy_cp - YY_G(yytext_ptr)); \\");
++ ("yyleng = (int) (yy_cp - YY_G(yytext_ptr)); \\");
+ }
+
+ else
+- indent_puts ("yyleng = (size_t) (yy_cp - yy_bp); \\");
++ indent_puts ("yyleng = (int) (yy_cp - yy_bp); \\");
+
+ /* Now also deal with copying yytext_ptr to yytext if needed. */
+ skelout (); /* %% [3.0] - break point in skel */