ports/devel/bison2/files/patch-reader.c
David E. O'Brien a3454389d0 Update to version 1.33.
This version was tested locally by a few trusted committers & friends,
and is believed to *actually* be as usable and stable as version 1.28.
(unlike *cough*, *cough* other 1.3x versions which have caused no end
of problems...)
2002-02-17 03:52:38 +00:00

23 lines
801 B
C

--- src/reader.c.orig Thu Feb 7 09:12:44 2002
+++ src/reader.c Sat Feb 16 19:49:02 2002
@@ -34,6 +34,8 @@
#include "reader.h"
#include "conflicts.h"
+extern int broken_undeftoken_init;
+
typedef struct symbol_list
{
struct symbol_list *next;
@@ -1978,7 +1979,10 @@
It is always token number 2. */
undeftoken = getsym ("$undefined.");
undeftoken->class = token_sym;
- undeftoken->user_token_number = 2;
+ /* XXX ``broken_undeftoken_init'' makes Bison 1.29 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
TABLE_OBSTACK and FDEFINES file. Also notice any %token, %left,