From: Ian Abbott Date: Thu, 21 Mar 2013 15:12:35 +0000 (+0000) Subject: lib: fix calib_yyparse() conflict X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=90ce9a94bdb6b26a9cbffdf2e9922b0b1f668a65;p=comedilib.git lib: fix calib_yyparse() conflict For newer versions of Bison, the declaration of our calib_yyparse() function in "lib/libinternal.h" clashes with that in the generated "lib/calib_yacc.h". Remove the declarations of calib_yyerror() and calib_yyparse() from "lib/libinternal.h" and declare them in "lib/calib_yacc.c". --- diff --git a/lib/calib_yacc.y b/lib/calib_yacc.y index 5a2dd95..94483d9 100644 --- a/lib/calib_yacc.y +++ b/lib/calib_yacc.y @@ -28,13 +28,14 @@ #include #include #include -#include "calib_yacc.h" -#include "calib_lex.h" #define YYERROR_VERBOSE #define YYPARSE_PARAM parse_arg #define YYLEX_PARAM priv(YYPARSE_PARAM)->yyscanner +#include "calib_yacc.h" +#include "calib_lex.h" + enum polynomial_direction { POLYNOMIAL_TO_PHYS, @@ -347,6 +348,11 @@ extern comedi_calibration_t* _comedi_parse_calibration_file( const char *cal_fil return priv.parsed_file; } +static void yyerror(const char *s) +{ + fprintf(stderr, "%s\n", s); +} + %} %pure_parser @@ -504,10 +510,5 @@ extern comedi_calibration_t* _comedi_parse_calibration_file( const char *cal_fil %% -void calib_yyerror(char *s) -{ - fprintf(stderr, "%s\n", s); -} - diff --git a/lib/libinternal.h b/lib/libinternal.h index 7f58c74..05e35dd 100644 --- a/lib/libinternal.h +++ b/lib/libinternal.h @@ -146,8 +146,6 @@ int valid_chan(comedi_t *it,unsigned int subdevice,unsigned int chan); int comedi_get_rangetype(comedi_t *it,unsigned int subdevice,unsigned int chan); #define YY_DECL int calib_yylex(YYSTYPE *calib_lvalp, yyscan_t yyscanner) -void calib_yyerror(char *s); -int calib_yyparse(void *parse_arg); #endif