Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Nov 2014 16:51:10 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372078 - in head/devel: ptlib/files pwlib/files
Message-ID:  <201411021651.sA2GpAvO012123@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sun Nov  2 16:51:09 2014
New Revision: 372078
URL: https://svnweb.freebsd.org/changeset/ports/372078
QAT: https://qat.redports.org/buildarchive/r372078/

Log:
  Allow building with bison 3
  
  PR:		ports/194680

Added:
  head/devel/ptlib/files/patch-src_ptlib_common_getdate.y   (contents, props changed)
  head/devel/pwlib/files/patch-src_ptlib_common_getdate.y   (contents, props changed)

Added: head/devel/ptlib/files/patch-src_ptlib_common_getdate.y
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/ptlib/files/patch-src_ptlib_common_getdate.y	Sun Nov  2 16:51:09 2014	(r372078)
@@ -0,0 +1,47 @@
+--- src/ptlib/common/getdate.y.orig	2013-02-20 02:11:52 UTC
++++ src/ptlib/common/getdate.y
+@@ -106,8 +106,6 @@ struct Variables {
+ 
+ 
+ #define YYPURE		1
+-#define YYLEX_PARAM	VARIABLE
+-#define YYPARSE_PARAM	parseParam
+ 
+ #define yyparse		PTime_yyparse
+ #define yylex		PTime_yylex
+@@ -121,9 +119,9 @@ static int yyparse(void *); 
+ static int yylex();
+ 
+ #ifdef __GNUC__
+-static int yyerror(char const *msg);
++static int yyerror(void *, char const *msg);
+ #else
+-static void yyerror(char const *msg);
++static void yyerror(void *, char const *msg);
+ #endif
+ 
+ 
+@@ -133,6 +131,8 @@ static void SetPossibleDate(struct Varia
+ %}
+ 
+ %pure_parser
++%parse-param {void *parseParam}
++%lex-param {void *parseParam}
+ 
+ %union {
+     time_t		Number;
+@@ -1018,12 +1018,12 @@ time_t STDAPICALLTYPE PTimeParse(void * 
+ #endif
+ 
+ #ifdef __GNUC__
+-int yyerror(const char * s)
++int yyerror(void *var, const char * s)
+ {
+   return 0;
+ }
+ #else
+-static void yyerror(const char * s)
++static void yyerror(void *var, const char * s)
+ {
+ }
+ #endif

Added: head/devel/pwlib/files/patch-src_ptlib_common_getdate.y
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/pwlib/files/patch-src_ptlib_common_getdate.y	Sun Nov  2 16:51:09 2014	(r372078)
@@ -0,0 +1,111 @@
+--- src/ptlib/common/getdate.y.orig	2007-10-19 06:22:32 UTC
++++ src/ptlib/common/getdate.y
+@@ -106,8 +106,6 @@ struct Variables {
+ 
+ 
+ #define YYPURE		1
+-#define YYLEX_PARAM	VARIABLE->yyInput
+-#define YYPARSE_PARAM	parseParam
+ 
+ #define yyparse		PTime_yyparse
+ #define yylex		PTime_yylex
+@@ -117,9 +115,9 @@ static int yyparse(void *); 
+ static int yylex();
+ 
+ #ifdef __GNUC__
+-static int yyerror();
++static int yyerror(void *, char const *msg);
+ #else
+-static void yyerror();
++static void yyerror(void *, char const *msg);
+ #endif
+ 
+ 
+@@ -129,6 +127,8 @@ static void SetPossibleDate(struct Varia
+ %}
+ 
+ %pure_parser
++%parse-param {void *parseParam}
++%lex-param {void *parseParam}
+ 
+ %union {
+     time_t		Number;
+@@ -718,22 +718,22 @@ static int LookupWord(char * buff, YYSTY
+ #ifndef __GNUC__
+ static
+ #endif
+-int yylex(YYSTYPE * yylval, void * yyInput)
++int yylex(YYSTYPE * yylval, struct Variables * vars)
+ {
+     register char	*p;
+     char		buff[20];
+     int			Count;
+     int			sign;
+-    register int	c = PTimeGetChar(yyInput);
++    register int	c = PTimeGetChar(vars->yyInput);
+ 
+     while (c != EOF && c != '\0' && c != '\n') {
+ 	while (isspace(c))
+-	    c = PTimeGetChar(yyInput);
++	    c = PTimeGetChar(vars->yyInput);
+ 
+ 	if (isdigit(c) || c == '-' || c == '+') {
+ 	    if (c == '-' || c == '+') {
+ 		sign = c == '-' ? -1 : 1;
+-		if (!isdigit(c = PTimeGetChar(yyInput)))
++		if (!isdigit(c = PTimeGetChar(vars->yyInput)))
+ 		    /* skip the '-' sign */
+ 		    continue;
+ 	    }
+@@ -743,10 +743,10 @@ int yylex(YYSTYPE * yylval, void * yyInp
+             Count = 0; /* Count number of digits */
+ 	    while (isdigit(c)) {
+ 		yylval->Number = 10 * yylval->Number + c - '0';
+-		c = PTimeGetChar(yyInput);
++		c = PTimeGetChar(vars->yyInput);
+                 Count++;
+ 	    }
+-	    PTimeUngetChar(yyInput, c);
++	    PTimeUngetChar(vars->yyInput, c);
+ 	    if (sign < 0)
+ 		yylval->Number = -yylval->Number;
+ 	    if (sign)
+@@ -759,12 +759,12 @@ int yylex(YYSTYPE * yylval, void * yyInp
+ 	}
+ 
+ 	if (isalpha(c)) {
+-	    for (p = buff; isalpha(c) || c == '.'; c = PTimeGetChar(yyInput)) {
++	    for (p = buff; isalpha(c) || c == '.'; c = PTimeGetChar(vars->yyInput)) {
+ 		if (p < &buff[sizeof(buff)-1])
+ 		    *p++ = (char)c;
+ 	    }
+ 	    *p = '\0';
+-	    PTimeUngetChar(yyInput, c);
++	    PTimeUngetChar(vars->yyInput, c);
+ 	    return LookupWord(buff, yylval);
+ 	}
+ 
+@@ -773,7 +773,7 @@ int yylex(YYSTYPE * yylval, void * yyInp
+ 
+ 	Count = 0;
+ 	do {
+-	    c = PTimeGetChar(yyInput);
++	    c = PTimeGetChar(vars->yyInput);
+ 	    if (c == '\0' || c == EOF)
+ 		return c;
+ 	    if (c == '(')
+@@ -1008,12 +1008,12 @@ time_t STDAPICALLTYPE PTimeParse(void * 
+ #endif
+ 
+ #ifdef __GNUC__
+-int yyerror(const char * s)
++int yyerror(void *var, const char * s)
+ {
+   return 0;
+ }
+ #else
+-static void yyerror(const char * s)
++static void yyerror(void *var, const char * s)
+ {
+ }
+ #endif



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