X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=blobdiff_plain;f=conffile.y;h=7837abe651365c12e460f4492db4f39da5f825d6;hp=cd53b7cf88f349d919e9fc0c18af69e46479bd5a;hb=ba72e2bf5e1a1cedc74f7de35e29cce7a0f4fca1;hpb=558fa3fbbb2e6fd1bed6dec54ef603ceb6c943ad diff --git a/conffile.y b/conffile.y index cd53b7c..7837abe 100644 --- a/conffile.y +++ b/conffile.y @@ -8,8 +8,15 @@ #include #include #include +/* Bison stupidly redeclares malloc/free unless they are #defined + * (or a bunch of madder conditions) */ +#ifndef malloc +# define malloc malloc +# define free free +#endif #include "secnet.h" #include "conffile_internal.h" +#include "conffile.yy.h" #include "util.h" #define YYERROR_VERBOSE @@ -17,7 +24,7 @@ static struct p_node *node(uint32_t type, struct p_node *l, struct p_node *r); static struct p_node *result; -static void yyerror(char *s); +static void yyerror(const char *s); %} @@ -73,7 +80,7 @@ item: TOK_STRING %% -static void yyerror(char *s) +static void yyerror(const char *s) { Message(M_FATAL,"config file %s line %d: %s\n",config_file, config_lineno,s);