cmake: fix uses of undefined macro identifiers (-Wundef)

This commit is contained in:
Anonymous Maarten
2023-11-17 04:06:26 +01:00
committed by GitHub
parent cc7c0a2dab
commit d81d986858
430 changed files with 1289 additions and 1260 deletions

View File

@@ -103,10 +103,10 @@ extern __inline int _SDL_xadd_watcom(volatile int *a, int v);
*/
#if !defined(HAVE_MSC_ATOMICS) && !defined(HAVE_GCC_ATOMICS) && !defined(__MACOSX__) && !defined(__SOLARIS__) && !defined(HAVE_WATCOM_ATOMICS)
#define EMULATE_CAS 1
#define EMULATE_CAS
#endif
#if EMULATE_CAS
#ifdef EMULATE_CAS
static SDL_SpinLock locks[32];
static SDL_INLINE void enterLock(void *a)
@@ -137,7 +137,7 @@ SDL_bool SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval)
return (SDL_bool) OSAtomicCompareAndSwap32Barrier(oldval, newval, &a->value);
#elif defined(__SOLARIS__)
return (SDL_bool)((int)atomic_cas_uint((volatile uint_t *)&a->value, (uint_t)oldval, (uint_t)newval) == oldval);
#elif EMULATE_CAS
#elif defined(EMULATE_CAS)
SDL_bool retval = SDL_FALSE;
enterLock(a);
@@ -167,7 +167,7 @@ SDL_bool SDL_AtomicCASPtr(void **a, void *oldval, void *newval)
return (SDL_bool) OSAtomicCompareAndSwap32Barrier((int32_t)oldval, (int32_t)newval, (int32_t*) a);
#elif defined(__SOLARIS__)
return (SDL_bool)(atomic_cas_ptr(a, oldval, newval) == oldval);
#elif EMULATE_CAS
#elif defined(EMULATE_CAS)
SDL_bool retval = SDL_FALSE;
enterLock(a);