changeset 69:be97ae4f30c0

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/)
author Eric Wing <ewing . public |-at-| gmail . com>
date Wed, 20 Jun 2012 10:32:41 -0700
parents 492239f6ffc9
children 7d63f5149d40
files ALmixer.c Isolated/SoundDecoder.c Isolated/SoundDecoder.h Isolated/SoundDecoder_Internal.h
diffstat 4 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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 <android/log.h>
 	#define fprintf(stderr, ...) __android_log_print(ANDROID_LOG_INFO, "ALmixer", __VA_ARGS__)
--- 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 <string.h>
 #include <assert.h>
 
-#ifdef ANDROID_NDK
+#ifdef __ANDROID__
 #include <android/log.h>
 #endif
 
@@ -108,7 +108,7 @@
 }
 
 
-#ifdef ANDROID_NDK
+#ifdef __ANDROID__
 #include <stdarg.h>
 #include <android/log.h>
 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
 }
--- 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 <endian.h>
 	#if _BYTE_ORDER == _BIG_ENDIAN
 		#define __BIG_ENDIAN__ 1
--- 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.