From 5e0b0d35216bf261b956ec0364162d35a1a751e5 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 5 Jul 2019 14:37:49 +0200 Subject: [PATCH] server: Rename cpu_type_t to client_cpu_t. To avoid conflicts with mac headers. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/kernel32/process.c | 2 +- dlls/ntdll/process.c | 2 +- include/wine/server_protocol.h | 16 ++++++++-------- server/protocol.def | 14 +++++++------- server/request.h | 2 +- server/trace.c | 14 +++++++------- tools/make_requests | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 7c40c34a218..2dcd53b0fd5 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -174,7 +174,7 @@ static inline unsigned int is_path_prefix( const WCHAR *prefix, const WCHAR *fil /*********************************************************************** * is_64bit_arch */ -static inline BOOL is_64bit_arch( cpu_type_t cpu ) +static inline BOOL is_64bit_arch( client_cpu_t cpu ) { return (cpu == CPU_x86_64 || cpu == CPU_ARM64); } diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 8b9d5bcfbd1..e3c2ba5ccbf 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -62,7 +62,7 @@ static const BOOL is_win64 = (sizeof(void *) > sizeof(int)); static const char * const cpu_names[] = { "x86", "x86_64", "PowerPC", "ARM", "ARM64" }; -static inline BOOL is_64bit_arch( cpu_type_t cpu ) +static inline BOOL is_64bit_arch( client_cpu_t cpu ) { return (cpu == CPU_x86_64 || cpu == CPU_ARM64); } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index d26f27c41a1..392c944d6d9 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -119,12 +119,12 @@ enum cpu_type { CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64 }; -typedef int cpu_type_t; +typedef int client_cpu_t; typedef struct { - cpu_type_t cpu; + client_cpu_t cpu; unsigned int flags; union { @@ -743,7 +743,7 @@ typedef struct unsigned int header_size; unsigned int file_size; unsigned int checksum; - cpu_type_t cpu; + client_cpu_t cpu; int __pad; } pe_image_info_t; #define IMAGE_FLAGS_ComPlusNativeReady 0x01 @@ -774,7 +774,7 @@ struct new_process_request int socket_fd; obj_handle_t exe_file; unsigned int access; - cpu_type_t cpu; + client_cpu_t cpu; data_size_t info_size; /* VARARG(objattr,object_attributes); */ /* VARARG(info,startup_info,info_size); */ @@ -796,7 +796,7 @@ struct exec_process_request struct request_header __header; int socket_fd; obj_handle_t exe_file; - cpu_type_t cpu; + client_cpu_t cpu; }; struct exec_process_reply { @@ -881,7 +881,7 @@ struct init_thread_request client_ptr_t entry; int reply_fd; int wait_fd; - cpu_type_t cpu; + client_cpu_t cpu; char __pad_52[4]; }; struct init_thread_reply @@ -946,7 +946,7 @@ struct get_process_info_reply timeout_t end_time; int exit_code; int priority; - cpu_type_t cpu; + client_cpu_t cpu; short int debugger_present; short int debug_children; }; @@ -6691,6 +6691,6 @@ union generic_reply struct resume_process_reply resume_process_reply; }; -#define SERVER_PROTOCOL_VERSION 587 +#define SERVER_PROTOCOL_VERSION 588 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index b80a6d6adb3..8157199f2fa 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -135,12 +135,12 @@ enum cpu_type { CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64 }; -typedef int cpu_type_t; +typedef int client_cpu_t; /* context data */ typedef struct { - cpu_type_t cpu; /* cpu type */ + client_cpu_t cpu; /* cpu type */ unsigned int flags; /* SERVER_CTX_* flags */ union { @@ -759,7 +759,7 @@ typedef struct unsigned int header_size; unsigned int file_size; unsigned int checksum; - cpu_type_t cpu; + client_cpu_t cpu; int __pad; } pe_image_info_t; #define IMAGE_FLAGS_ComPlusNativeReady 0x01 @@ -788,7 +788,7 @@ struct rawinput_device int socket_fd; /* file descriptor for process socket */ obj_handle_t exe_file; /* file handle for main exe */ unsigned int access; /* access rights for process object */ - cpu_type_t cpu; /* CPU that the new process will use */ + client_cpu_t cpu; /* CPU that the new process will use */ data_size_t info_size; /* size of startup info */ VARARG(objattr,object_attributes); /* object attributes */ VARARG(info,startup_info,info_size); /* startup information */ @@ -804,7 +804,7 @@ struct rawinput_device @REQ(exec_process) int socket_fd; /* file descriptor for process socket */ obj_handle_t exe_file; /* file handle for main exe */ - cpu_type_t cpu; /* CPU that the new process will use */ + client_cpu_t cpu; /* CPU that the new process will use */ @END @@ -859,7 +859,7 @@ struct rawinput_device client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */ int reply_fd; /* fd for reply pipe */ int wait_fd; /* fd for blocking calls pipe */ - cpu_type_t cpu; /* CPU that this thread is running on */ + client_cpu_t cpu; /* CPU that this thread is running on */ @REPLY process_id_t pid; /* process id of the new thread's process */ thread_id_t tid; /* thread id of the new thread */ @@ -902,7 +902,7 @@ struct rawinput_device timeout_t end_time; /* process end time */ int exit_code; /* process exit code */ int priority; /* priority class */ - cpu_type_t cpu; /* CPU that this process is running on */ + client_cpu_t cpu; /* CPU that this process is running on */ short int debugger_present; /* process is being debugged */ short int debug_children; /* inherit debugger to child processes */ @END diff --git a/server/request.h b/server/request.h index 57f8937c79b..be65a237dd0 100644 --- a/server/request.h +++ b/server/request.h @@ -722,8 +722,8 @@ C_ASSERT( sizeof(async_data_t) == 40 ); C_ASSERT( sizeof(atom_t) == 4 ); C_ASSERT( sizeof(char) == 1 ); C_ASSERT( sizeof(char_info_t) == 4 ); +C_ASSERT( sizeof(client_cpu_t) == 4 ); C_ASSERT( sizeof(client_ptr_t) == 8 ); -C_ASSERT( sizeof(cpu_type_t) == 4 ); C_ASSERT( sizeof(data_size_t) == 4 ); C_ASSERT( sizeof(file_pos_t) == 8 ); C_ASSERT( sizeof(hw_input_t) == 32 ); diff --git a/server/trace.c b/server/trace.c index 3213490eb7b..0df649ea295 100644 --- a/server/trace.c +++ b/server/trace.c @@ -129,7 +129,7 @@ static void dump_ioctl_code( const char *prefix, const ioctl_code_t *code ) } } -static void dump_cpu_type( const char *prefix, const cpu_type_t *code ) +static void dump_client_cpu( const char *prefix, const client_cpu_t *code ) { switch (*code) { @@ -565,7 +565,7 @@ static void dump_varargs_context( const char *prefix, data_size_t size ) memcpy( &ctx, context, size ); fprintf( stderr,"%s{", prefix ); - dump_cpu_type( "cpu=", &ctx.cpu ); + dump_client_cpu( "cpu=", &ctx.cpu ); switch (ctx.cpu) { case CPU_x86: @@ -1196,7 +1196,7 @@ static void dump_varargs_pe_image_info( const char *prefix, data_size_t size ) info.zerobits, info.subsystem, info.subsystem_low, info.subsystem_high, info.gp, info.image_charact, info.dll_charact, info.machine, info.contains_code, info.image_flags, info.loader_flags, info.header_size, info.file_size, info.checksum ); - dump_cpu_type( ",cpu=", &info.cpu ); + dump_client_cpu( ",cpu=", &info.cpu ); fputc( '}', stderr ); remove_data( size ); } @@ -1247,7 +1247,7 @@ static void dump_new_process_request( const struct new_process_request *req ) fprintf( stderr, ", socket_fd=%d", req->socket_fd ); fprintf( stderr, ", exe_file=%04x", req->exe_file ); fprintf( stderr, ", access=%08x", req->access ); - dump_cpu_type( ", cpu=", &req->cpu ); + dump_client_cpu( ", cpu=", &req->cpu ); fprintf( stderr, ", info_size=%u", req->info_size ); dump_varargs_object_attributes( ", objattr=", cur_size ); dump_varargs_startup_info( ", info=", min(cur_size,req->info_size) ); @@ -1265,7 +1265,7 @@ static void dump_exec_process_request( const struct exec_process_request *req ) { fprintf( stderr, " socket_fd=%d", req->socket_fd ); fprintf( stderr, ", exe_file=%04x", req->exe_file ); - dump_cpu_type( ", cpu=", &req->cpu ); + dump_client_cpu( ", cpu=", &req->cpu ); } static void dump_get_new_process_info_request( const struct get_new_process_info_request *req ) @@ -1327,7 +1327,7 @@ static void dump_init_thread_request( const struct init_thread_request *req ) dump_uint64( ", entry=", &req->entry ); fprintf( stderr, ", reply_fd=%d", req->reply_fd ); fprintf( stderr, ", wait_fd=%d", req->wait_fd ); - dump_cpu_type( ", cpu=", &req->cpu ); + dump_client_cpu( ", cpu=", &req->cpu ); } static void dump_init_thread_reply( const struct init_thread_reply *req ) @@ -1379,7 +1379,7 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re dump_timeout( ", end_time=", &req->end_time ); fprintf( stderr, ", exit_code=%d", req->exit_code ); fprintf( stderr, ", priority=%d", req->priority ); - dump_cpu_type( ", cpu=", &req->cpu ); + dump_client_cpu( ", cpu=", &req->cpu ); fprintf( stderr, ", debugger_present=%d", req->debugger_present ); fprintf( stderr, ", debug_children=%d", req->debug_children ); } diff --git a/tools/make_requests b/tools/make_requests index 405e1301cd1..faeabe5852d 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -51,7 +51,7 @@ my %formats = "irp_params_t" => [ 32, 8, "&dump_irp_params" ], "luid_t" => [ 8, 4, "&dump_luid" ], "ioctl_code_t" => [ 4, 4, "&dump_ioctl_code" ], - "cpu_type_t" => [ 4, 4, "&dump_cpu_type" ], + "client_cpu_t" => [ 4, 4, "&dump_client_cpu" ], "hw_input_t" => [ 32, 8, "&dump_hw_input" ], );