From 8aea84dab78c0fa82540fe7a3b291af831549e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 29 Apr 2021 22:25:54 +0200 Subject: [PATCH] [CRT] Do not define builtin functions if not needed --- sdk/include/crt/mingw32/intrin_x86.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/include/crt/mingw32/intrin_x86.h b/sdk/include/crt/mingw32/intrin_x86.h index 5cf6c2884b3..888bf795313 100644 --- a/sdk/include/crt/mingw32/intrin_x86.h +++ b/sdk/include/crt/mingw32/intrin_x86.h @@ -663,16 +663,20 @@ __INTRIN_INLINE short _InterlockedIncrement16(volatile short * lpAddend) #endif #if defined(__x86_64__) +#if !HAS_BUILTIN(_InterlockedDecrement64) __INTRIN_INLINE long long _InterlockedDecrement64(volatile long long * lpAddend) { return _InterlockedExchangeAdd64(lpAddend, -1) - 1; } +#endif +#if !HAS_BUILTIN(_InterlockedIncrement64) __INTRIN_INLINE long long _InterlockedIncrement64(volatile long long * lpAddend) { return _InterlockedExchangeAdd64(lpAddend, 1) + 1; } #endif +#endif #endif /* (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 */