mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
__atomic_load_n() appears to be available in GCC 5 but not GCC 4
This commit is contained in:
parent
028716e79f
commit
7891e72dca
@ -211,8 +211,7 @@ SDL_AtomicAdd(SDL_atomic_t *a, int v)
|
|||||||
int
|
int
|
||||||
SDL_AtomicGet(SDL_atomic_t *a)
|
SDL_AtomicGet(SDL_atomic_t *a)
|
||||||
{
|
{
|
||||||
/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */
|
#if defined(HAVE_GCC_ATOMICS) && (__GNUC__ >= 5)
|
||||||
#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
|
||||||
return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
|
return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
|
||||||
#else
|
#else
|
||||||
int value;
|
int value;
|
||||||
@ -226,8 +225,7 @@ SDL_AtomicGet(SDL_atomic_t *a)
|
|||||||
void *
|
void *
|
||||||
SDL_AtomicGetPtr(void **a)
|
SDL_AtomicGetPtr(void **a)
|
||||||
{
|
{
|
||||||
/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */
|
#if defined(HAVE_GCC_ATOMICS) && (__GNUC__ >= 5)
|
||||||
#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
|
||||||
return __atomic_load_n(a, __ATOMIC_SEQ_CST);
|
return __atomic_load_n(a, __ATOMIC_SEQ_CST);
|
||||||
#else
|
#else
|
||||||
void *value;
|
void *value;
|
||||||
|
Loading…
Reference in New Issue
Block a user