ntdll: Make the client cpu constant global.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
master
Alexandre Julliard 2020-06-22 16:16:17 +02:00
parent 9e3893cc29
commit 67949d96a7
3 changed files with 12 additions and 16 deletions

View File

@ -417,10 +417,8 @@ static NTSTATUS get_pe_file_info( UNICODE_STRING *path, HANDLE *handle, pe_image
/* assume current arch */
#if defined(__i386__) || defined(__x86_64__)
info->cpu = is_64bit ? CPU_x86_64 : CPU_x86;
#elif defined(__arm__)
info->cpu = CPU_ARM;
#elif defined(__aarch64__)
info->cpu = CPU_ARM64;
#else
info->cpu = client_cpu;
#endif
*handle = 0;
return STATUS_SUCCESS;

View File

@ -100,18 +100,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(server);
#define SOCKETNAME "socket" /* name of the socket file */
#define LOCKNAME "lock" /* name of the lock file */
#ifdef __i386__
static const enum cpu_type client_cpu = CPU_x86;
#elif defined(__x86_64__)
static const enum cpu_type client_cpu = CPU_x86_64;
#elif defined(__arm__)
static const enum cpu_type client_cpu = CPU_ARM;
#elif defined(__aarch64__)
static const enum cpu_type client_cpu = CPU_ARM64;
#else
#error Unsupported CPU
#endif
static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
static const char *server_dir;

View File

@ -28,6 +28,16 @@
#define InterlockedCompareExchange64(dest,xchg,cmp) RtlInterlockedCompareExchange64(dest,xchg,cmp)
#endif
#ifdef __i386__
static const enum cpu_type client_cpu = CPU_x86;
#elif defined(__x86_64__)
static const enum cpu_type client_cpu = CPU_x86_64;
#elif defined(__arm__)
static const enum cpu_type client_cpu = CPU_ARM;
#elif defined(__aarch64__)
static const enum cpu_type client_cpu = CPU_ARM64;
#endif
struct debug_info
{
unsigned int str_pos; /* current position in strings buffer */