[CRT] Do not define builtin functions if not needed

This commit is contained in:
Jérôme Gardou 2021-04-29 22:25:54 +02:00 committed by Jérôme Gardou
parent 7197620b89
commit 8aea84dab7

View file

@ -663,16 +663,20 @@ __INTRIN_INLINE short _InterlockedIncrement16(volatile short * lpAddend)
#endif #endif
#if defined(__x86_64__) #if defined(__x86_64__)
#if !HAS_BUILTIN(_InterlockedDecrement64)
__INTRIN_INLINE long long _InterlockedDecrement64(volatile long long * lpAddend) __INTRIN_INLINE long long _InterlockedDecrement64(volatile long long * lpAddend)
{ {
return _InterlockedExchangeAdd64(lpAddend, -1) - 1; return _InterlockedExchangeAdd64(lpAddend, -1) - 1;
} }
#endif
#if !HAS_BUILTIN(_InterlockedIncrement64)
__INTRIN_INLINE long long _InterlockedIncrement64(volatile long long * lpAddend) __INTRIN_INLINE long long _InterlockedIncrement64(volatile long long * lpAddend)
{ {
return _InterlockedExchangeAdd64(lpAddend, 1) + 1; return _InterlockedExchangeAdd64(lpAddend, 1) + 1;
} }
#endif #endif
#endif
#endif /* (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 */ #endif /* (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 */