[syslog-ng]1.5.18/bison-1.32/stdio.h problem

Balazs Scheidler [email protected]
Thu, 30 May 2002 10:03:35 +0200


On Thu, May 30, 2002 at 12:00:45PM +0400, Borsenkow Andrej wrote:
> Obviously new bison includes stdio.h only when debugging is enabled. Without
> it fails miserably in yyerror:
> 
> /* Enable debugging if requested.  */
> #if YYDEBUG
> 
> # ifndef YYFPRINTF
> #  ifdef __cplusplus
> #   include <cstdio>  /* INFRINGES ON USER NAME SPACE */
> #  else
> #   include <stdio.h> /* INFRINGES ON USER NAME SPACE */
> #  endif
> #  define YYFPRINTF YYSTD (fprintf)
> # endif
> 
> (this is not the original cfg-grammar.c but regenerated locally).
> 
> The following patch is bandaid but I am not sure how to do it portably
> enough (meaning - accounting for earlier bison versions). One possibility is
> of course move yyerror out of cfg-grammar.y to avoid confusion.
> 
> -andrej

I think stdio.h can safely be included.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1