Patched to compile on some platforms.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 29 Mar 2017 12:04:17 -0400
changeset 1094756a0a429d309
parent 10946 623e8891e091
child 10948 3ff1b72962c3
Patched to compile on some platforms.
src/atomic/SDL_atomic.c
     1.1 --- a/src/atomic/SDL_atomic.c	Wed Mar 29 15:48:22 2017 +0100
     1.2 +++ b/src/atomic/SDL_atomic.c	Wed Mar 29 12:04:17 2017 -0400
     1.3 @@ -211,7 +211,8 @@
     1.4  int
     1.5  SDL_AtomicGet(SDL_atomic_t *a)
     1.6  {
     1.7 -#ifdef HAVE_GCC_ATOMICS
     1.8 +/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */
     1.9 +#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
    1.10      return __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
    1.11  #else
    1.12      int value;
    1.13 @@ -225,7 +226,8 @@
    1.14  void *
    1.15  SDL_AtomicGetPtr(void **a)
    1.16  {
    1.17 -#ifdef HAVE_GCC_ATOMICS
    1.18 +/* !!! FIXME: __atomic_load_n is only in newer GCCs and Clang, I think, and apparently not on Android. This #ifdef should be more exact. */
    1.19 +#if defined(HAVE_GCC_ATOMICS) && !defined(__ANDROID__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
    1.20      return __atomic_load_n(a, __ATOMIC_SEQ_CST);
    1.21  #else
    1.22      void *value;