Alexandre Julliard : ntdll: Make the client cpu constant global.
Alexandre Julliard
julliard at winehq.org
Mon Jun 22 15:55:57 CDT 2020
Module: wine
Branch: master
Commit: 67949d96a7c49b95801723e8cfdf327e907822cb
URL: https://source.winehq.org/git/wine.git/?a=commit;h=67949d96a7c49b95801723e8cfdf327e907822cb
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jun 22 16:16:17 2020 +0200
ntdll: Make the client cpu constant global.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/process.c | 6 ++----
dlls/ntdll/unix/server.c | 12 ------------
dlls/ntdll/unix/unix_private.h | 10 ++++++++++
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 804985da4d..758f47a1e9 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -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;
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index d81fb3b89a..299a311496 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -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;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index e353a17a7d..e0bc5a9603 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -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 */
More information about the wine-cvs
mailing list