__ANDROID__ is the correct macro to check for an android system.ANDROID is only defined in NDK build system (.mk) and not in the standalone NDK.
1.1 --- a/include/SDL_egl.h Mon May 05 22:26:21 2014 +0300
1.2 +++ b/include/SDL_egl.h Mon May 05 22:21:26 2014 +0300
1.3 @@ -420,7 +420,7 @@
1.4 typedef struct gbm_bo *EGLNativePixmapType;
1.5 typedef void *EGLNativeWindowType;
1.6
1.7 -#elif defined(ANDROID) /* Android */
1.8 +#elif defined(__ANDROID__) /* Android */
1.9
1.10 struct ANativeWindow;
1.11 struct egl_native_pixmap_t;
2.1 --- a/include/SDL_rwops.h Mon May 05 22:26:21 2014 +0300
2.2 +++ b/include/SDL_rwops.h Mon May 05 22:21:26 2014 +0300
2.3 @@ -93,7 +93,7 @@
2.4 Uint32 type;
2.5 union
2.6 {
2.7 -#if defined(ANDROID)
2.8 +#if defined(__ANDROID__)
2.9 struct
2.10 {
2.11 void *fileNameRef;
3.1 --- a/src/audio/SDL_audio.c Mon May 05 22:26:21 2014 +0300
3.2 +++ b/src/audio/SDL_audio.c Mon May 05 22:21:26 2014 +0300
3.3 @@ -305,7 +305,7 @@
3.4 }
3.5 #endif
3.6
3.7 -#if defined(ANDROID)
3.8 +#if defined(__ANDROID__)
3.9 #include <android/log.h>
3.10 #endif
3.11
4.1 --- a/src/file/SDL_rwops.c Mon May 05 22:26:21 2014 +0300
4.2 +++ b/src/file/SDL_rwops.c Mon May 05 22:21:26 2014 +0300
4.3 @@ -38,7 +38,7 @@
4.4 #include "cocoa/SDL_rwopsbundlesupport.h"
4.5 #endif /* __APPLE__ */
4.6
4.7 -#ifdef ANDROID
4.8 +#ifdef __ANDROID__
4.9 #include "../core/android/SDL_android.h"
4.10 #include "SDL_system.h"
4.11 #endif
4.12 @@ -466,7 +466,7 @@
4.13 SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
4.14 return NULL;
4.15 }
4.16 -#if defined(ANDROID)
4.17 +#if defined(__ANDROID__)
4.18 #ifdef HAVE_STDIO_H
4.19 /* Try to open the file on the filesystem first */
4.20 if (*file == '/') {
5.1 --- a/test/testautomation_rwops.c Mon May 05 22:26:21 2014 +0300
5.2 +++ b/test/testautomation_rwops.c Mon May 05 22:21:26 2014 +0300
5.3 @@ -309,7 +309,7 @@
5.4 if (rw == NULL) return TEST_ABORTED;
5.5
5.6 /* Check type */
5.7 -#if defined(ANDROID)
5.8 +#if defined(__ANDROID__)
5.9 SDLTest_AssertCheck(
5.10 rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
5.11 "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);
5.12 @@ -356,7 +356,7 @@
5.13 if (rw == NULL) return TEST_ABORTED;
5.14
5.15 /* Check type */
5.16 -#if defined(ANDROID)
5.17 +#if defined(__ANDROID__)
5.18 SDLTest_AssertCheck(
5.19 rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,
5.20 "Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);