Sync to Wine-20050930:
authorGé van Geldorp <ge@gse.nl>
Sat, 8 Oct 2005 12:43:38 +0000 (12:43 +0000)
committerGé van Geldorp <ge@gse.nl>
Sat, 8 Oct 2005 12:43:38 +0000 (12:43 +0000)
Alexandre Julliard <julliard@winehq.org>
- Fixed a number of pointer to integer conversions that wouldn't work
  right on a 64-bit platform.
- Now that we are requiring bison anyway, make the .tab.c file use the
  same base name as the .y file, so that we can generate correct
  dependencies in all cases.

svn path=/trunk/; revision=18327

reactos/tools/wrc/Makefile.in
reactos/tools/wrc/lex.yy.c
reactos/tools/wrc/newstruc.c
reactos/tools/wrc/parser.l
reactos/tools/wrc/parser.tab.c [moved from reactos/tools/wrc/y.tab.c with 99% similarity]
reactos/tools/wrc/parser.tab.h [moved from reactos/tools/wrc/y.tab.h with 99% similarity]
reactos/tools/wrc/wrc.mak

index 382ae16..c6f8bf8 100644 (file)
@@ -4,7 +4,6 @@ TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 LEXOPT    = -Cf #-w -b
-YACCOPT   = #-v
 EXEEXT    = @EXEEXT@
 
 PROGRAMS = wrc$(EXEEXT)
@@ -21,7 +20,7 @@ C_SRCS = \
        writeres.c
 
 EXTRA_SRCS = parser.y parser.l
-EXTRA_OBJS = y.tab.o @LEX_OUTPUT_ROOT@.o
+EXTRA_OBJS = parser.tab.o @LEX_OUTPUT_ROOT@.o
 
 all: $(PROGRAMS)
 
@@ -30,17 +29,17 @@ all: $(PROGRAMS)
 wrc$(EXEEXT): $(OBJS) $(LIBDIR)/wpp/libwpp.a
        $(CC) $(CFLAGS) -o $@ $(OBJS) -L$(LIBDIR) -lwpp -lwine_unicode -lwine_port $(LEXLIB) $(LDFLAGS)
 
-y.tab.c y.tab.h: parser.y
-       $(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y
+parser.tab.c parser.tab.h: parser.y
+       $(BISON) -d -t $(SRCDIR)/parser.y -o parser.tab.c
 
 # hack to allow parallel make
-y.tab.h: y.tab.c
-y.tab.o: y.tab.h
+parser.tab.h: parser.tab.c
+parser.tab.o: parser.tab.h
 
 @LEX_OUTPUT_ROOT@.c: parser.l
        $(LEX) $(LEXOPT) -d -8 $(SRCDIR)/parser.l
 
-@LEX_OUTPUT_ROOT@.o: y.tab.h
+@LEX_OUTPUT_ROOT@.o: parser.tab.h
 
 install:: $(PROGRAMS)
        $(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext)
index 69c6fb0..e9a3e4d 100644 (file)
@@ -7002,7 +7002,7 @@ char *yytext;
 #include "parser.h"
 #include "newstruc.h"
 
-#include "y.tab.h"
+#include "parser.tab.h"
 
 #define YY_USE_PROTOS
 #define YY_NO_UNPUT
index f0774ea..5d3ce95 100644 (file)
@@ -819,8 +819,7 @@ static void handle_ani_list(riff_tag_t *lst, enum res_e type, int isswapped)
                                       isprint(rtp->tag[2]) ? rtp->tag[2] : '.',
                                       isprint(rtp->tag[3]) ? rtp->tag[3] : '.');
 
-               /* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */
-               if((DWORD)rtp & 1)
+               if((UINT_PTR)rtp & 1)
                        rtp = SKIP_TAG(rtp,1);
        }
 }
@@ -930,8 +929,7 @@ ani_curico_t *new_ani_curico(enum res_e type, raw_data_t *rd, int *memopt)
                                       isprint(rtp->tag[2]) ? rtp->tag[2] : '.',
                                       isprint(rtp->tag[3]) ? rtp->tag[3] : '.');
 
-                       /* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */
-                       if((DWORD)rtp & 1)
+                       if((UINT_PTR)rtp & 1)
                                rtp = SKIP_TAG(rtp,1);
                }
 
index 9983d10..d8abcad 100644 (file)
@@ -109,7 +109,7 @@ cident      [a-zA-Z_][0-9a-zA-Z_]*
 #include "parser.h"
 #include "newstruc.h"
 
-#include "y.tab.h"
+#include "parser.tab.h"
 
 #define YY_USE_PROTOS
 #define YY_NO_UNPUT
similarity index 99%
rename from reactos/tools/wrc/y.tab.c
rename to reactos/tools/wrc/parser.tab.c
index c047f64..fb29627 100644 (file)
@@ -527,7 +527,7 @@ typedef union YYSTYPE {
        ani_any_t       *ani;
 } YYSTYPE;
 /* Line 191 of yacc.c.  */
-#line 531 "y.tab.c"
+#line 531 "parser.tab.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -539,7 +539,7 @@ typedef union YYSTYPE {
 
 
 /* Line 214 of yacc.c.  */
-#line 543 "y.tab.c"
+#line 543 "parser.tab.c"
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
@@ -4167,7 +4167,7 @@ yyreduce:
     }
 
 /* Line 1000 of yacc.c.  */
-#line 4171 "y.tab.c"
+#line 4171 "parser.tab.c"
 \f
   yyvsp -= yylen;
   yyssp -= yylen;
similarity index 99%
rename from reactos/tools/wrc/y.tab.h
rename to reactos/tools/wrc/parser.tab.h
index 0e1d5da..1d20448 100644 (file)
@@ -247,7 +247,7 @@ typedef union YYSTYPE {
        ani_any_t       *ani;
 } YYSTYPE;
 /* Line 1275 of yacc.c.  */
-#line 251 "y.tab.h"
+#line 251 "parser.tab.h"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
index 5f3992b..c1d6d09 100644 (file)
@@ -44,7 +44,7 @@ WRC_SOURCES = $(addprefix $(WRC_BASE_), \
        utils.c \
        wrc.c \
        writeres.c \
-       y.tab.c \
+       parser.tab.c \
        lex.yy.c \
        port$(SEP)mkstemps.c \
        )
@@ -104,7 +104,7 @@ $(WRC_INT_)writeres.o: $(WRC_BASE_)writeres.c | $(WRC_INT)
        $(ECHO_CC)
        ${host_gcc} $(WRC_HOST_CFLAGS) -c $< -o $@
 
-$(WRC_INT_)y.tab.o: $(WRC_BASE_)y.tab.c | $(WRC_INT)
+$(WRC_INT_)parser.tab.o: $(WRC_BASE_)parser.tab.c | $(WRC_INT)
        $(ECHO_CC)
        ${host_gcc} $(WRC_HOST_CFLAGS) -c $< -o $@