X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/62ab6972e8338613d09562166b4b4fa5f48693a4..2ba3b73c587f277f726724af09b2db62932552f8:/tests/calc.at?ds=inline diff --git a/tests/calc.at b/tests/calc.at index 40f23fd8..3fa7aa61 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -32,14 +32,24 @@ AT_DATA([calc.y], [[/* Infix notation calculator--calc */ %{ +#include #include -#include + +#if STDC_HEADERS +# include +# include +#else +char *strcat(char *dest, const char *src); +#endif #include ]$4[ static int power (int base, int exponent); static void yyerror (const char *s); static int yylex (void); +static int yygetc (void); +static void yyungetc (int c); + extern void perror (const char *s); %} @@ -96,7 +106,7 @@ yyerror (const char *s) } static int -yygetc () +yygetc (void) { int res = getc (yyin); #if YYLSP_NEEDED @@ -283,7 +293,7 @@ AT_DATA_CALC_Y([$1]) # Specify the output files to avoid problems on different file systems. AT_CHECK([bison calc.y -o calc.c patsubst([$1], [--yyerror-verbose])], [0], [], []) -AT_CHECK([$CC $CFLAGS calc.c -o calc], 0, [], []) +AT_CHECK([$CC $CFLAGS $CPPFLAGS calc.c -o calc], 0, [], []) # Test the priorities. _AT_CHECK_CALC([$1],