summaryrefslogtreecommitdiffstats
path: root/devel/bison175
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-01-17 11:42:02 +0000
committerobrien <obrien@FreeBSD.org>2000-01-17 11:42:02 +0000
commit86496b3cd24257f66fe2c511bf2d6adcc5b83a1f (patch)
tree2f92fce9127093866f1210989245fcccb2f52c74 /devel/bison175
parentacbdbb2ce1188272df6aff60a093b32afc4c7d5a (diff)
downloadFreeBSD-ports-86496b3cd24257f66fe2c511bf2d6adcc5b83a1f.zip
FreeBSD-ports-86496b3cd24257f66fe2c511bf2d6adcc5b83a1f.tar.gz
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/bison175')
-rw-r--r--devel/bison175/files/patch-getargs.c18
-rw-r--r--devel/bison175/files/patch-reader.c22
2 files changed, 40 insertions, 0 deletions
diff --git a/devel/bison175/files/patch-getargs.c b/devel/bison175/files/patch-getargs.c
new file mode 100644
index 0000000..a08818e
--- /dev/null
+++ b/devel/bison175/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/bison175/files/patch-reader.c b/devel/bison175/files/patch-reader.c
new file mode 100644
index 0000000..29e1146
--- /dev/null
+++ b/devel/bison175/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)
OpenPOWER on IntegriCloud