Fix -Wundef warnings due to use of unguarded HAVE_GCC_ATOMICS

This commit is contained in:
Anonymous Maarten
2023-03-27 19:12:55 +02:00
parent 9dc6cd250e
commit ab71c1a006
2 changed files with 6 additions and 4 deletions

View File

@@ -78,7 +78,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
return SDL_FALSE;
}
#elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
#elif defined(HAVE_GCC_ATOMICS) || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
return __sync_lock_test_and_set(lock, 1) == 0;
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
@@ -183,7 +183,7 @@ void SDL_AtomicLock(SDL_SpinLock *lock)
void SDL_AtomicUnlock(SDL_SpinLock *lock)
{
#if HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
#if defined(HAVE_GCC_ATOMICS) || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
__sync_lock_release(lock);
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))