# HG changeset patch # User Eric Wing # Date 1340213561 25200 # Node ID be97ae4f30c0a6d7949ac1c9127f731f2350de2a # Parent 492239f6ffc95af6558f29cc4b8fb77b15eb5fbb Changed use of ANDROID_NDK to __ANDROID__ since it seems to be standard. Running this dumps the #defines for me: /usr/local/bin/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-cpp -dM /dev/null (Instructions found from http://annoyingtechnicaldetails.wordpress.com/2012/02/01/which-macros-does-the-android-ndk-gcc-define/) diff -r 492239f6ffc9 -r be97ae4f30c0 ALmixer.c --- a/ALmixer.c Wed Jun 20 10:30:47 2012 -0700 +++ b/ALmixer.c Wed Jun 20 10:32:41 2012 -0700 @@ -62,7 +62,7 @@ */ #include "LinkedList.h" -#ifdef ANDROID_NDK +#ifdef __ANDROID__ #undef fprintf #include #define fprintf(stderr, ...) __android_log_print(ANDROID_LOG_INFO, "ALmixer", __VA_ARGS__) diff -r 492239f6ffc9 -r be97ae4f30c0 Isolated/SoundDecoder.c --- a/Isolated/SoundDecoder.c Wed Jun 20 10:30:47 2012 -0700 +++ b/Isolated/SoundDecoder.c Wed Jun 20 10:32:41 2012 -0700 @@ -8,7 +8,7 @@ #include #include -#ifdef ANDROID_NDK +#ifdef __ANDROID__ #include #endif @@ -108,7 +108,7 @@ } -#ifdef ANDROID_NDK +#ifdef __ANDROID__ #include #include int SoundDecoder_DebugPrint(const char* format, ...) @@ -163,7 +163,7 @@ // SDL_SetError which I'm emulating has no number parameter. TError_SetErrorv(s_errorPool, 1, err_str, argp); va_end(argp); -#ifdef ANDROID_NDK +#ifdef __ANDROID__ __android_log_print(ANDROID_LOG_INFO, "SoundDecoder_SetError", TError_GetLastErrorStr(s_errorPool)); #endif } diff -r 492239f6ffc9 -r be97ae4f30c0 Isolated/SoundDecoder.h --- a/Isolated/SoundDecoder.h Wed Jun 20 10:30:47 2012 -0700 +++ b/Isolated/SoundDecoder.h Wed Jun 20 10:32:41 2012 -0700 @@ -50,7 +50,7 @@ #define AUDIO_U16 AUDIO_U16LSB #define AUDIO_S16 AUDIO_S16LSB -#ifdef ANDROID_NDK +#ifdef __ANDROID__ #include #if _BYTE_ORDER == _BIG_ENDIAN #define __BIG_ENDIAN__ 1 diff -r 492239f6ffc9 -r be97ae4f30c0 Isolated/SoundDecoder_Internal.h --- a/Isolated/SoundDecoder_Internal.h Wed Jun 20 10:30:47 2012 -0700 +++ b/Isolated/SoundDecoder_Internal.h Wed Jun 20 10:32:41 2012 -0700 @@ -47,7 +47,7 @@ #define ERR_PREVIOUS_SAMPLE_ERROR "Cannot operate on sample due to previous error" #define ERR_ALREADY_AT_EOF_ERROR "Cannot operate on sample because already at EOF" -#ifdef ANDROID_NDK +#ifdef __ANDROID__ /* This macro crashes when a format string is used. * Provide a real function instead.