aboutsummaryrefslogtreecommitdiffstats
path: root/devel/bison
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-01-17 19:42:02 +0800
committerobrien <obrien@FreeBSD.org>2000-01-17 19:42:02 +0800
commit86496b3cd24257f66fe2c511bf2d6adcc5b83a1f (patch)
tree2f92fce9127093866f1210989245fcccb2f52c74 /devel/bison
parentacbdbb2ce1188272df6aff60a093b32afc4c7d5a (diff)
downloadfreebsd-ports-gnome-86496b3cd24257f66fe2c511bf2d6adcc5b83a1f.tar.gz
freebsd-ports-gnome-86496b3cd24257f66fe2c511bf2d6adcc5b83a1f.tar.zst
freebsd-ports-gnome-86496b3cd24257f66fe2c511bf2d6adcc5b83a1f.zip
Add the Bison 1.25 bug-for-bug "broken-undeftoken-init" compatiblity option
taken from src/contrib/bison, as we will need this if one is buiding our older EGCS source base.
Diffstat (limited to 'devel/bison')
-rw-r--r--devel/bison/files/patch-getargs.c18
-rw-r--r--devel/bison/files/patch-reader.c22
2 files changed, 40 insertions, 0 deletions
diff --git a/devel/bison/files/patch-getargs.c b/devel/bison/files/patch-getargs.c
new file mode 100644
index 000000000000..a08818ef5ca3
--- /dev/null
+++ b/devel/bison/files/patch-getargs.c
@@ -0,0 +1,18 @@
+--- src/getargs.c.orig Mon Jun 14 15:19:05 1999
++++ src/getargs.c Mon Jan 17 03:38:56 2000
+@@ -31,6 +31,7 @@
+ int noparserflag = 0;
+ int toknumflag = 0;
+ int rawtoknumflag = 0;
++int broken_undeftoken_init;
+ char *spec_name_prefix; /* for -p. */
+ char *spec_file_prefix; /* for -b. */
+ extern int fixed_outfiles;/* for -y */
+@@ -44,6 +45,7 @@
+
+ struct option longopts[] =
+ {
++ {"broken-undeftoken-init", 0, &broken_undeftoken_init, 1},
+ {"debug", 0, &debugflag, 1},
+ {"defines", 0, &definesflag, 1},
+ {"file-prefix", 1, 0, 'b'},
diff --git a/devel/bison/files/patch-reader.c b/devel/bison/files/patch-reader.c
new file mode 100644
index 000000000000..29e1146a7e1d
--- /dev/null
+++ b/devel/bison/files/patch-reader.c
@@ -0,0 +1,22 @@
+--- src/reader.c.orig Mon Jun 14 15:19:05 1999
++++ src/reader.c Mon Jan 17 03:38:56 2000
+@@ -44,6 +44,7 @@
+ int rline_allocated;
+
+ extern char *program_name;
++extern int broken_undeftoken_init;
+ extern int definesflag;
+ extern int nolinesflag;
+ extern int noparserflag;
+@@ -199,7 +200,10 @@
+ /* it is always token number 2. */
+ undeftoken = getsym("$undefined.");
+ undeftoken->class = STOKEN;
+- undeftoken->user_token_number = 2;
++ /* XXX ``broken_undeftoken_init'' makes Bison 1.28 bug-compatable
++ with Bison 1.25. FreeBSD depends on this behavior when compiling
++ EGCS-1.1.2's cc1plus. */
++ undeftoken->user_token_number = broken_undeftoken_init ? 0 : 2;
+ /* Read the declaration section. Copy %{ ... %} groups to ftable and fdefines file.
+ Also notice any %token, %left, etc. found there. */
+ if (noparserflag)