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".
This commit is contained in:
Ian Abbott 2013-03-21 15:12:35 +00:00
parent 3dfae5a6ee
commit 90ce9a94bd
2 changed files with 8 additions and 9 deletions

View file

@ -28,13 +28,14 @@
#include <math.h>
#include <string.h>
#include <stdlib.h>
#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);
}

View file

@ -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