From a768774fa3e5bd0b7451e32e05e01fe779e1bb5e Mon Sep 17 00:00:00 2001 From: Carsten Larsen Date: Sun, 22 Jan 2017 00:51:35 +0100 Subject: [PATCH] 64 bit support on Windows --- app/localize/start.h | 4 ++-- lib/clib/mem.c | 2 +- lib/clib/memcpy.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/localize/start.h b/app/localize/start.h index c998f07e..a6297981 100644 --- a/app/localize/start.h +++ b/app/localize/start.h @@ -73,13 +73,13 @@ #ifdef __powerpc__ # define TXTCPU "PowerPC" #endif -#if defined(__x86_64__) +#if defined(__x86_64__) || defined(_M_AMD64) # define TXTCPU "amd64" #endif #if defined(__arm__) || defined(_M_ARM) # define TXTCPU "ARM" #endif -#if defined(__aarch64__) +#if defined(__aarch64__) || defined(_M_ARM64) # define TXTCPU "arm64" #endif #ifndef TXTCPU diff --git a/lib/clib/mem.c b/lib/clib/mem.c index 79f37f3b..1ffc6340 100644 --- a/lib/clib/mem.c +++ b/lib/clib/mem.c @@ -83,7 +83,7 @@ void* AllocMemSafe(size_t size) list->count = 0; } -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || defined(_M_AMD64) || defined(_M_ARM64) // Align to bytes of 8 allocsize = (size + 7) & ~0x07; #else diff --git a/lib/clib/memcpy.c b/lib/clib/memcpy.c index ed07ddcf..a7a57f1a 100644 --- a/lib/clib/memcpy.c +++ b/lib/clib/memcpy.c @@ -52,7 +52,7 @@ * sizeof(word) MUST BE A POWER OF TWO * SO THAT wmask BELOW IS ALL ONES */ -#if defined(__x86_64__) || defined(__aarch64__) +#if defined(__x86_64__) || defined(__aarch64__) || defined(_M_AMD64) || defined(_M_ARM64) typedef uint64_t word; #else typedef uint32_t word;