Module: wine
Branch: master
Commit: 46ab4f0ce7295d7b3a31a5a10e6314ad9444c35a
URL: https://gitlab.winehq.org/wine/wine/-/commit/46ab4f0ce7295d7b3a31a5a10e6314…
Author: Eric Pouech <epouech(a)codeweavers.com>
Date: Fri Jan 19 15:39:43 2024 +0100
include: Avoid redefining _InterlockedCompareExchange128 as inline.
Note the _InterlockedCompareExchange128 for a x86_64 machine is only
defined as intrinsic when -mcx16 option is enabled.
But we use always use the intrinsic definition on x86_64 so that
compilation done without the -mcx16 could be detected (on C++ only).
And the intrinsic has been added recently to aarch64 machine for clang.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
---
include/winnt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/winnt.h b/include/winnt.h
index 6b47d0e41c0..e9fef20c76d 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -7184,7 +7184,7 @@ static FORCEINLINE DECLSPEC_NORETURN void __fastfail(unsigned int code)
#define InterlockedCompareExchange128 _InterlockedCompareExchange128
-#if defined(_MSC_VER) && !defined(__clang__)
+#if defined(_MSC_VER) && (!defined(__clang__) || !defined(__aarch64__) || __has_builtin(_InterlockedCompareExchange128))
#pragma intrinsic(_InterlockedCompareExchange128)
unsigned char _InterlockedCompareExchange128(volatile __int64 *, __int64, __int64, __int64 *);