mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-09 01:14:24 +02:00
Fix -Wundef warnings due to use of unguarded SDL_ATOMIC_DISABLED
This commit is contained in:
@@ -60,7 +60,7 @@ extern __inline int _SDL_xchg_watcom(volatile int *a, int v);
|
||||
SDL_bool
|
||||
SDL_AtomicTryLock(SDL_SpinLock *lock)
|
||||
{
|
||||
#if SDL_ATOMIC_DISABLED
|
||||
#if defined(SDL_ATOMIC_DISABLED)
|
||||
/* Terrible terrible damage */
|
||||
static SDL_mutex *_spinlock_mutex;
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ static void SDL_InitDynamicAPI(void)
|
||||
/* SDL_AtomicLock calls SDL mutex functions to emulate if
|
||||
SDL_ATOMIC_DISABLED, which we can't do here, so in such a
|
||||
configuration, you're on your own. */
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
#ifndef SDL_ATOMIC_DISABLED
|
||||
static SDL_SpinLock lock = 0;
|
||||
SDL_AtomicLock_REAL(&lock);
|
||||
#endif
|
||||
@@ -494,7 +494,7 @@ static void SDL_InitDynamicAPI(void)
|
||||
already_initialized = SDL_TRUE;
|
||||
}
|
||||
|
||||
#if !SDL_ATOMIC_DISABLED
|
||||
#ifndef SDL_ATOMIC_DISABLED
|
||||
SDL_AtomicUnlock_REAL(&lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user