From b17522817bbd315c420eabab173d55b9c68abbc8 Mon Sep 17 00:00:00 2001 From: Bertho Stultiens Date: Sat, 20 Feb 1999 16:09:24 +0000 Subject: [PATCH] Fix a couple of 64bit platform problems and speed up compilation. See tools/wrc/CHANGES for details. --- tools/wrc/CHANGES | 18 ++++++++++++++++++ tools/wrc/genres.c | 1 + tools/wrc/newstruc.c | 1 + tools/wrc/parser.y | 1 + tools/wrc/wrc.h | 4 ++-- tools/wrc/wrctypes.h | 6 +++--- tools/wrc/writeres.c | 12 ++++++------ 7 files changed, 32 insertions(+), 11 deletions(-) diff --git a/tools/wrc/CHANGES b/tools/wrc/CHANGES index 27c6bfe5646..fcc53d2d687 100644 --- a/tools/wrc/CHANGES +++ b/tools/wrc/CHANGES @@ -1,3 +1,21 @@ +--------------------------------------------------------------------------- +Version 1.0.10 (18-Feb-1999) + +Alexandre Julliard +- Fixed the TIME_LONG ugliness. + +David Luyer +- Added string.h include in newstruc.c for compilation on 64bit platforms. +- Added TIME_LONG to support time_t==int in printf formats on alpha + platforms. + +Bertho Stultiens +- Added some more use of TIME_LONG in implicit format used in header-file + generation. +- Removed the windows.h include and replaced it with wintypes.h in + wrctypes.h and added winuser.h in two other sources. This cuts compilation + time by a factor of 2 and final executable size with debug by a factor 2.5. + --------------------------------------------------------------------------- Version 1.0.9 (01-Feb-1999) diff --git a/tools/wrc/genres.c b/tools/wrc/genres.c index abffb11ccc0..140b26e57d6 100644 --- a/tools/wrc/genres.c +++ b/tools/wrc/genres.c @@ -17,6 +17,7 @@ #include "wrc.h" #include "genres.h" #include "utils.h" +#include "winuser.h" #define SetResSize(res, tag) *(DWORD *)&((res)->data[(tag)]) = \ (res)->size - *(DWORD *)&((res)->data[(tag)]) diff --git a/tools/wrc/newstruc.c b/tools/wrc/newstruc.c index 509d3900d43..69a2fbee353 100644 --- a/tools/wrc/newstruc.c +++ b/tools/wrc/newstruc.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include "wrc.h" diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y index 0d5baf1fe1a..26593b1f54a 100644 --- a/tools/wrc/parser.y +++ b/tools/wrc/parser.y @@ -99,6 +99,7 @@ #include "dumpres.h" #include "preproc.h" #include "parser.h" +#include "winuser.h" #ifdef __BORLANDC__ #pragma warn -sig diff --git a/tools/wrc/wrc.h b/tools/wrc/wrc.h index 45eb95fbc29..9e60298a620 100644 --- a/tools/wrc/wrc.h +++ b/tools/wrc/wrc.h @@ -12,8 +12,8 @@ #include "wrctypes.h" #endif -#define WRC_VERSION "1.0.9" -#define WRC_RELEASEDATE "(01-Feb-1999)" +#define WRC_VERSION "1.0.10" +#define WRC_RELEASEDATE "(18-Feb-1999)" #define WRC_FULLVERSION WRC_VERSION " " WRC_RELEASEDATE /* Only used in heavy debugging sessions */ diff --git a/tools/wrc/wrctypes.h b/tools/wrc/wrctypes.h index 95ba59379b7..b3b02a4e101 100644 --- a/tools/wrc/wrctypes.h +++ b/tools/wrc/wrctypes.h @@ -9,8 +9,8 @@ #define __WRC_WRCTYPES_H /* First is MS style, second wine style */ -#if !defined(_INC_WINDOWS) && !defined(__WINE_WINDOWS_H) -#include "windows.h" +#ifndef __WINE_WINTYPES_H +#include "wintypes.h" #endif #ifndef MAKELANGID @@ -152,7 +152,7 @@ enum res_e { res_menex = 256 + 4, res_dlgex, - res_usr, + res_usr }; /* Raw bytes in a row... */ diff --git a/tools/wrc/writeres.c b/tools/wrc/writeres.c index 2e1714328a4..f0be98b3f76 100644 --- a/tools/wrc/writeres.c +++ b/tools/wrc/writeres.c @@ -64,8 +64,8 @@ char h_file_head_str[] = " * Cmdline: %s\n" " * Date : %s" " */\n\n" - "#ifndef __%08x_H\n" /* This becomes the data of compile */ - "#define __%08x_H\n\n" + "#ifndef __%08lx_H\n" /* This becomes the date of compile */ + "#define __%08lx_H\n\n" "#ifndef __WRC_RSC_H\n" "#include \n" "#endif\n\n" @@ -579,7 +579,7 @@ void write_pe_segment(FILE *fp, resource_t *top) /* Flags */ fprintf(fp, "\t.long\t0\n"); /* Time/Date stamp */ - fprintf(fp, "\t.long\t0x%08lx\n", now); + fprintf(fp, "\t.long\t0x%08lx\n", (long)now); /* Version */ fprintf(fp, "\t.long\t0\n"); /* FIXME: must version be filled out? */ /* # of id entries, # of name entries */ @@ -628,7 +628,7 @@ void write_pe_segment(FILE *fp, resource_t *top) fprintf(fp, ".L%s:\n", typelabel); fprintf(fp, "\t.long\t0\n"); /* Flags */ - fprintf(fp, "\t.long\t0x%08lx\n", now); /* TimeDate */ + fprintf(fp, "\t.long\t0x%08lx\n", (long)now); /* TimeDate */ fprintf(fp, "\t.long\t0\n"); /* FIXME: must version be filled out? */ fprintf(fp, "\t.short\t%d, %d\n", rcp->n_name_entries, rcp->n_id_entries); for(j = 0; j < rcp->count32; j++) @@ -681,7 +681,7 @@ void write_pe_segment(FILE *fp, resource_t *top) fprintf(fp, ".L%s_%s:\n", typelabel, namelabel); fprintf(fp, "\t.long\t0\n"); /* Flags */ - fprintf(fp, "\t.long\t0x%08lx\n", now); /* TimeDate */ + fprintf(fp, "\t.long\t0x%08lx\n", (long)now); /* TimeDate */ fprintf(fp, "\t.long\t0\n"); /* FIXME: must version be filled out? */ fprintf(fp, "\t.short\t0, %d\n", r32cp->count); @@ -1116,7 +1116,7 @@ void write_h_file(char *outname, resource_t *top) time(&now); fprintf(fo, h_file_head_str, input_name ? input_name : "stdin", - cmdline, ctime(&now), now, now); + cmdline, ctime(&now), (long)now, (long)now); /* First write the segment tables reference */ if(create_dir)