android: use __ARM_NEON instead of __ARM_NEON__ to include <arm_neon.h>
authorSylvain Becker <sylvain.becker@gmail.com>
Tue, 04 Dec 2018 12:34:45 +0100
changeset 1244917cb4ff70507
parent 12448 f167f874ae55
child 12450 1055156e99f3
android: use __ARM_NEON instead of __ARM_NEON__ to include <arm_neon.h>

Only __ARM_NEON is defined with Android NDK and arm64-v8a
Tested on ndk-r18, ndk-r13 and also Xcode.
(Visual Studio needs a different fix).

Fixes Bugzilla #4409.
include/SDL_cpuinfo.h
src/audio/SDL_audiotypecvt.c
     1.1 --- a/include/SDL_cpuinfo.h	Mon Dec 03 09:26:05 2018 -0500
     1.2 +++ b/include/SDL_cpuinfo.h	Tue Dec 04 12:34:45 2018 +0100
     1.3 @@ -54,7 +54,7 @@
     1.4  #if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
     1.5  #include <altivec.h>
     1.6  #endif
     1.7 -#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
     1.8 +#if defined(__ARM_NEON) && !defined(SDL_DISABLE_ARM_NEON_H)
     1.9  #include <arm_neon.h>
    1.10  #endif
    1.11  #if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
     2.1 --- a/src/audio/SDL_audiotypecvt.c	Mon Dec 03 09:26:05 2018 -0500
     2.2 +++ b/src/audio/SDL_audiotypecvt.c	Tue Dec 04 12:34:45 2018 +0100
     2.3 @@ -26,7 +26,7 @@
     2.4  #include "SDL_assert.h"
     2.5  
     2.6  /* !!! FIXME: disabled until we fix https://bugzilla.libsdl.org/show_bug.cgi?id=4186 */
     2.7 -#if 0 /*def __ARM_NEON__*/
     2.8 +#if 0 /*def __ARM_NEON */
     2.9  #define HAVE_NEON_INTRINSICS 1
    2.10  #endif
    2.11