Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2006 00:55:11 -0800
From:      Paul Eggert <eggert@CS.UCLA.EDU>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        freebsd@sopwith.solgatos.com, bug-bison@gnu.org, freebsd-ports@freebsd.org
Subject:   Re: portability fix for bison-1.75
Message-ID:  <874q3vz5lc.fsf@penguin.cs.ucla.edu>
In-Reply-To: <20060123072215.GB5518@xor.obsecurity.org> (Kris Kennaway's message of "Mon, 23 Jan 2006 02:22:15 -0500")
References:  <200601131825.SAA21164@sopwith.solgatos.com> <87r772obn8.fsf@penguin.cs.ucla.edu> <20060120211940.GA43031@xor.obsecurity.org> <87u0bymq7x.fsf@penguin.cs.ucla.edu> <20060122044224.GA81690@xor.obsecurity.org> <87lkx7zcsp.fsf@penguin.cs.ucla.edu> <20060123072215.GB5518@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway <kris@obsecurity.org> writes:

>> As far as I can tell, neither Pike 7.0 nor bro 0.8 is currently being
>> maintained by the upstream developer, so what procedure would you
>> prefer here, to make Bison 2.1 acceptable to you?  Should I send you a
>> patch for these programs personally?
>
> Yes, that would be best.

OK, thanks, here are proposed patches for both.

diff -pru bro-pub-0.8a88/parse.in bro-pub-0.8a88-fix/parse.in
--- bro-pub-0.8a88/parse.in	2004-03-20 16:55:13.000000000 -0800
+++ bro-pub-0.8a88-fix/parse.in	2006-01-23 00:47:29.000000000 -0800
@@ -94,7 +94,7 @@ extern int yyerror(const char[]);
 extern int brolex();
 
 #define YYLLOC_DEFAULT(Current, Rhs, N) \
-	Current = Rhs[N];
+	((Current) = (Rhs)[N])
 
 /*
  * Part of the module facility: while parsing, keep track of which
diff -pru pike-7.0.361/src/language.yacc pike-7.0.361-fix/src/language.yacc
--- pike-7.0.361/src/language.yacc	2001-08-02 16:10:39.000000000 -0700
+++ pike-7.0.361-fix/src/language.yacc	2006-01-23 00:53:38.000000000 -0800
@@ -259,7 +259,7 @@ static void __yy_memcpy(char *to, char *
 int yylex(YYSTYPE *yylval);
 /* Bison is stupid, and tries to optimize for space... */
 #ifdef YYBISON
-#define short int
+/* #define short int (commented out since it breaks with some Bisons) */
 #endif /* YYBISON */
 %}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?874q3vz5lc.fsf>