From f6a6aae6e6ce1c485b4b4b02413259649cf2b58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 28 Mar 2019 19:17:06 +0100 Subject: [PATCH] Add additional defines for MSVC ARM and ARM64 to conv.cpp (#399) Fixes ARM(64) regression introduced with #212 --- src/CalcManager/Ratpack/conv.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CalcManager/Ratpack/conv.cpp b/src/CalcManager/Ratpack/conv.cpp index 8822801..c25d448 100644 --- a/src/CalcManager/Ratpack/conv.cpp +++ b/src/CalcManager/Ratpack/conv.cpp @@ -36,14 +36,17 @@ wchar_t g_decimalSeparator = L'.'; // The following defines and Calc_ULong* functions were taken from // https://github.com/dotnet/coreclr/blob/8b1595b74c943b33fa794e63e440e6f4c9679478/src/pal/inc/rt/intsafe.h // under MIT License +// See also +// * https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros +// * https://sourceforge.net/p/predef/wiki/Architectures/ #if defined(MIDL_PASS) || defined(RC_INVOKED) || defined(_M_CEE_PURE) \ - || defined(_M_AMD64) || defined(__ARM_ARCH) || defined(__x86_64__) + || defined(_M_AMD64) || defined(__ARM_ARCH) || defined(__x86_64__) || defined(_M_ARM64) #ifndef Calc_UInt32x32To64 #define Calc_UInt32x32To64(a, b) ((uint64_t)((uint32_t)(a)) * (uint64_t)((uint32_t)(b))) #endif -#elif defined(_M_IX86) || defined(__i386__) +#elif defined(_M_IX86) || defined(__i386__) || defined(_M_ARM) #ifndef Calc_UInt32x32To64 #define Calc_UInt32x32To64(a, b) (uint64_t)((uint64_t)(uint32_t)(a) * (uint32_t)(b))