From 77cf8034e47be06951861af35b8c7ce931c97f1f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 9 Dec 2008 11:50:05 +0100 Subject: [PATCH] server: Don't use size_t for module sizes, they are limited to 2Gb anyway. --- include/wine/server_protocol.h | 8 ++++---- server/process.h | 2 +- server/protocol.def | 6 +++--- server/trace.c | 6 +++--- tools/make_requests | 1 - 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 39a4bee2c16..9f32b304d69 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -670,8 +670,8 @@ struct get_dll_info_request struct get_dll_info_reply { struct reply_header __header; - size_t size; void* entry_point; + data_size_t size; data_size_t filename_len; /* VARARG(filename,unicode_str); */ }; @@ -709,10 +709,10 @@ struct load_dll_request struct request_header __header; obj_handle_t handle; void* base; - size_t size; + void* name; + data_size_t size; int dbg_offset; int dbg_size; - void* name; /* VARARG(filename,unicode_str); */ }; struct load_dll_reply @@ -5046,6 +5046,6 @@ union generic_reply struct set_window_layered_info_reply set_window_layered_info_reply; }; -#define SERVER_PROTOCOL_VERSION 348 +#define SERVER_PROTOCOL_VERSION 349 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/process.h b/server/process.h index 52b3d26d7f9..c2bb8c338e4 100644 --- a/server/process.h +++ b/server/process.h @@ -38,8 +38,8 @@ struct process_dll struct list entry; /* entry in per-process dll list */ struct file *file; /* dll file */ void *base; /* dll base address (in process addr space) */ - size_t size; /* dll size */ void *name; /* ptr to ptr to name (in process addr space) */ + data_size_t size; /* dll size */ int dbg_offset; /* debug info offset */ int dbg_size; /* debug info size */ data_size_t namelen; /* length of dll file name */ diff --git a/server/protocol.def b/server/protocol.def index 804a5800823..eba1b82bc6b 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -618,8 +618,8 @@ typedef union obj_handle_t handle; /* process handle */ void* base_address; /* base address of module */ @REPLY - size_t size; /* module size */ void* entry_point; + data_size_t size; /* module size */ data_size_t filename_len; /* buffer len in bytes required to store filename */ VARARG(filename,unicode_str); /* file name of module */ @END @@ -645,10 +645,10 @@ typedef union @REQ(load_dll) obj_handle_t handle; /* file handle */ void* base; /* base address */ - size_t size; /* dll size */ + void* name; /* ptr to ptr to name (in process addr space) */ + data_size_t size; /* dll size */ int dbg_offset; /* debug info offset */ int dbg_size; /* debug info size */ - void* name; /* ptr to ptr to name (in process addr space) */ VARARG(filename,unicode_str); /* file name of dll */ @END diff --git a/server/trace.c b/server/trace.c index d8c2845d9a4..9f1585516d0 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1014,8 +1014,8 @@ static void dump_get_dll_info_request( const struct get_dll_info_request *req ) static void dump_get_dll_info_reply( const struct get_dll_info_reply *req ) { - fprintf( stderr, " size=%lu,", (unsigned long)req->size ); fprintf( stderr, " entry_point=%p,", req->entry_point ); + fprintf( stderr, " size=%u,", req->size ); fprintf( stderr, " filename_len=%u,", req->filename_len ); fprintf( stderr, " filename=" ); dump_varargs_unicode_str( cur_size ); @@ -1045,10 +1045,10 @@ static void dump_load_dll_request( const struct load_dll_request *req ) { fprintf( stderr, " handle=%04x,", req->handle ); fprintf( stderr, " base=%p,", req->base ); - fprintf( stderr, " size=%lu,", (unsigned long)req->size ); + fprintf( stderr, " name=%p,", req->name ); + fprintf( stderr, " size=%u,", req->size ); fprintf( stderr, " dbg_offset=%d,", req->dbg_offset ); fprintf( stderr, " dbg_size=%d,", req->dbg_size ); - fprintf( stderr, " name=%p,", req->name ); fprintf( stderr, " filename=" ); dump_varargs_unicode_str( cur_size ); } diff --git a/tools/make_requests b/tools/make_requests index ef4e8b56ce7..76be7b2a33e 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -31,7 +31,6 @@ my %formats = "unsigned int" => "%08x", "unsigned long" => "%lx", "void*" => "%p", - "size_t" => "%lu (unsigned long)", "data_size_t" => "%u", "obj_handle_t" => "%04x", "atom_t" => "%04x",