diff --git a/ChangeLog b/ChangeLog index f69678bab..90536390c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-29 Pavel Roskin + + * include/grub/script.h: Don't include grub_script.tab.h. It's + a generated file, which may only be included from the files with + DEPENDENCIES rules in the makefile. Don't use typedef YYSTYPE, + use union YYSTYPE, as the later allows forward declaration. + * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE. + 2008-05-29 Robert Millan * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'. diff --git a/include/grub/script.h b/include/grub/script.h index 0dcd4a12b..5218d1352 100644 --- a/include/grub/script.h +++ b/include/grub/script.h @@ -23,7 +23,6 @@ #include #include #include -#include "grub_script.tab.h" struct grub_script_mem; @@ -238,7 +237,8 @@ struct grub_script_mem *grub_script_mem_record_stop (struct grub_parser_param *s void *grub_script_malloc (struct grub_parser_param *state, grub_size_t size); /* Functions used by bison. */ -int grub_script_yylex (YYSTYPE *, struct grub_parser_param *); +union YYSTYPE; +int grub_script_yylex (union YYSTYPE *, struct grub_parser_param *); int grub_script_yyparse (struct grub_parser_param *); void grub_script_yyerror (struct grub_parser_param *, char const *); diff --git a/normal/lexer.c b/normal/lexer.c index b72b4ee47..d66237c6e 100644 --- a/normal/lexer.c +++ b/normal/lexer.c @@ -136,10 +136,11 @@ nextchar (struct grub_lexer_param *state) } int -grub_script_yylex2 (YYSTYPE *yylval, struct grub_parser_param *parsestate); +grub_script_yylex2 (union YYSTYPE *yylval, + struct grub_parser_param *parsestate); int -grub_script_yylex (YYSTYPE *yylval, struct grub_parser_param *parsestate) +grub_script_yylex (union YYSTYPE *yylval, struct grub_parser_param *parsestate) { int r = -1; @@ -153,7 +154,7 @@ grub_script_yylex (YYSTYPE *yylval, struct grub_parser_param *parsestate) } int -grub_script_yylex2 (YYSTYPE *yylval, struct grub_parser_param *parsestate) +grub_script_yylex2 (union YYSTYPE *yylval, struct grub_parser_param *parsestate) { grub_parser_state_t newstate; char use;