2008-05-29 Pavel Roskin <proski@gnu.org>

* 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.
This commit is contained in:
proski 2008-05-30 03:26:56 +00:00
parent 47248e0825
commit 528ad8f272
3 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2008-05-29 Pavel Roskin <proski@gnu.org>
* 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 <rmh@aybabtu.com> 2008-05-29 Robert Millan <rmh@aybabtu.com>
* term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'. * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.

View file

@ -23,7 +23,6 @@
#include <grub/types.h> #include <grub/types.h>
#include <grub/err.h> #include <grub/err.h>
#include <grub/parser.h> #include <grub/parser.h>
#include "grub_script.tab.h"
struct grub_script_mem; 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); void *grub_script_malloc (struct grub_parser_param *state, grub_size_t size);
/* Functions used by bison. */ /* 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 *); int grub_script_yyparse (struct grub_parser_param *);
void grub_script_yyerror (struct grub_parser_param *, char const *); void grub_script_yyerror (struct grub_parser_param *, char const *);

View file

@ -136,10 +136,11 @@ nextchar (struct grub_lexer_param *state)
} }
int int
grub_script_yylex2 (YYSTYPE *yylval, struct grub_parser_param *parsestate); grub_script_yylex2 (union YYSTYPE *yylval,
struct grub_parser_param *parsestate);
int 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; int r = -1;
@ -153,7 +154,7 @@ grub_script_yylex (YYSTYPE *yylval, struct grub_parser_param *parsestate)
} }
int 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; grub_parser_state_t newstate;
char use; char use;