]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-05-29 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Fri, 30 May 2008 03:26:56 +0000 (03:26 +0000)
committerproski <proski@localhost>
Fri, 30 May 2008 03:26:56 +0000 (03:26 +0000)
* 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.

ChangeLog
include/grub/script.h
normal/lexer.c

index f69678babbd2b1854c0959be0a68df461b20070a..90536390c0f3c24492b3bbbf7700f649a9b708b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
index 0dcd4a12b13b794937975ad92e28af63c1fbffcc..5218d13522873230dc07ca200ecd929c00b85a94 100644 (file)
@@ -23,7 +23,6 @@
 #include <grub/types.h>
 #include <grub/err.h>
 #include <grub/parser.h>
-#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 *);
 
index b72b4ee47bec6eaea4bc7c8d23b60131b980bb2a..d66237c6eea9bb739190c24cb3a43d465b2c442b 100644 (file)
@@ -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;