Commit b1752281 authored by Bertho Stultiens's avatar Bertho Stultiens Committed by Alexandre Julliard

Fix a couple of 64bit platform problems and speed up compilation. See

tools/wrc/CHANGES for details.
parent 9a73d867
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
Version 1.0.10 (18-Feb-1999)
Alexandre Julliard <julliard@lrc.epfl.ch>
- Fixed the TIME_LONG ugliness.
David Luyer <luyer@ucs.uwa.edu.au>
- 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 <bertho@akhphd.au.dk>
- 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) Version 1.0.9 (01-Feb-1999)
Albert den Haan <albertd@corel.ca>: Albert den Haan <albertd@corel.ca>:
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "wrc.h" #include "wrc.h"
#include "genres.h" #include "genres.h"
#include "utils.h" #include "utils.h"
#include "winuser.h"
#define SetResSize(res, tag) *(DWORD *)&((res)->data[(tag)]) = \ #define SetResSize(res, tag) *(DWORD *)&((res)->data[(tag)]) = \
(res)->size - *(DWORD *)&((res)->data[(tag)]) (res)->size - *(DWORD *)&((res)->data[(tag)])
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <string.h>
#include <config.h> #include <config.h>
#include "wrc.h" #include "wrc.h"
......
...@@ -99,6 +99,7 @@ ...@@ -99,6 +99,7 @@
#include "dumpres.h" #include "dumpres.h"
#include "preproc.h" #include "preproc.h"
#include "parser.h" #include "parser.h"
#include "winuser.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma warn -sig #pragma warn -sig
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "wrctypes.h" #include "wrctypes.h"
#endif #endif
#define WRC_VERSION "1.0.9" #define WRC_VERSION "1.0.10"
#define WRC_RELEASEDATE "(01-Feb-1999)" #define WRC_RELEASEDATE "(18-Feb-1999)"
#define WRC_FULLVERSION WRC_VERSION " " WRC_RELEASEDATE #define WRC_FULLVERSION WRC_VERSION " " WRC_RELEASEDATE
/* Only used in heavy debugging sessions */ /* Only used in heavy debugging sessions */
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#define __WRC_WRCTYPES_H #define __WRC_WRCTYPES_H
/* First is MS style, second wine style */ /* First is MS style, second wine style */
#if !defined(_INC_WINDOWS) && !defined(__WINE_WINDOWS_H) #ifndef __WINE_WINTYPES_H
#include "windows.h" #include "wintypes.h"
#endif #endif
#ifndef MAKELANGID #ifndef MAKELANGID
...@@ -152,7 +152,7 @@ enum res_e { ...@@ -152,7 +152,7 @@ enum res_e {
res_menex = 256 + 4, res_menex = 256 + 4,
res_dlgex, res_dlgex,
res_usr, res_usr
}; };
/* Raw bytes in a row... */ /* Raw bytes in a row... */
......
...@@ -64,8 +64,8 @@ char h_file_head_str[] = ...@@ -64,8 +64,8 @@ char h_file_head_str[] =
" * Cmdline: %s\n" " * Cmdline: %s\n"
" * Date : %s" " * Date : %s"
" */\n\n" " */\n\n"
"#ifndef __%08x_H\n" /* This becomes the data of compile */ "#ifndef __%08lx_H\n" /* This becomes the date of compile */
"#define __%08x_H\n\n" "#define __%08lx_H\n\n"
"#ifndef __WRC_RSC_H\n" "#ifndef __WRC_RSC_H\n"
"#include <wrc_rsc.h>\n" "#include <wrc_rsc.h>\n"
"#endif\n\n" "#endif\n\n"
...@@ -579,7 +579,7 @@ void write_pe_segment(FILE *fp, resource_t *top) ...@@ -579,7 +579,7 @@ void write_pe_segment(FILE *fp, resource_t *top)
/* Flags */ /* Flags */
fprintf(fp, "\t.long\t0\n"); fprintf(fp, "\t.long\t0\n");
/* Time/Date stamp */ /* Time/Date stamp */
fprintf(fp, "\t.long\t0x%08lx\n", now); fprintf(fp, "\t.long\t0x%08lx\n", (long)now);
/* Version */ /* Version */
fprintf(fp, "\t.long\t0\n"); /* FIXME: must version be filled out? */ fprintf(fp, "\t.long\t0\n"); /* FIXME: must version be filled out? */
/* # of id entries, # of name entries */ /* # of id entries, # of name entries */
...@@ -628,7 +628,7 @@ void write_pe_segment(FILE *fp, resource_t *top) ...@@ -628,7 +628,7 @@ void write_pe_segment(FILE *fp, resource_t *top)
fprintf(fp, ".L%s:\n", typelabel); fprintf(fp, ".L%s:\n", typelabel);
fprintf(fp, "\t.long\t0\n"); /* Flags */ 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.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); fprintf(fp, "\t.short\t%d, %d\n", rcp->n_name_entries, rcp->n_id_entries);
for(j = 0; j < rcp->count32; j++) for(j = 0; j < rcp->count32; j++)
...@@ -681,7 +681,7 @@ void write_pe_segment(FILE *fp, resource_t *top) ...@@ -681,7 +681,7 @@ void write_pe_segment(FILE *fp, resource_t *top)
fprintf(fp, ".L%s_%s:\n", typelabel, namelabel); fprintf(fp, ".L%s_%s:\n", typelabel, namelabel);
fprintf(fp, "\t.long\t0\n"); /* Flags */ 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.long\t0\n"); /* FIXME: must version be filled out? */
fprintf(fp, "\t.short\t0, %d\n", r32cp->count); fprintf(fp, "\t.short\t0, %d\n", r32cp->count);
...@@ -1116,7 +1116,7 @@ void write_h_file(char *outname, resource_t *top) ...@@ -1116,7 +1116,7 @@ void write_h_file(char *outname, resource_t *top)
time(&now); time(&now);
fprintf(fo, h_file_head_str, input_name ? input_name : "stdin", 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 */ /* First write the segment tables reference */
if(create_dir) if(create_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment