UNICODE (Win32 only) Use the Unicode variant ('W') of the Win32 API instead
of ANSI/ASCII one ('A'). Useful for WinCE.
-PLATFORM_ANDROID Compile for Android NDK platform.
+PLATFORM_ANDROID (or __ANDROID__) Compile for Android NDK platform.
SN_TARGET_PS3 Compile for Sony PS/3.
/* retrieve the call chain. */
#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
|| defined(__FreeBSD__) || defined(__DragonFly__) \
- || defined(PLATFORM_ANDROID)) && !defined(GC_CAN_SAVE_CALL_STACKS)
+ || defined(PLATFORM_ANDROID) || defined(__ANDROID__)) \
+ && !defined(GC_CAN_SAVE_CALL_STACKS)
# define GC_ADD_CALLER
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
/* gcc knows how to retrieve return address, but we don't know */
# endif
# endif
-# if !defined(GC_PTHREAD_EXIT_ATTRIBUTE) && !defined(PLATFORM_ANDROID) \
+# if !defined(GC_PTHREAD_EXIT_ATTRIBUTE) \
+ && !defined(PLATFORM_ANDROID) && !defined(__ANDROID__) \
&& (defined(GC_LINUX_THREADS) || defined(GC_SOLARIS_THREADS))
/* Intercept pthread_exit on Linux and Solaris. */
# if defined(__GNUC__) /* since GCC v2.7 */
/* Machine specific parts contributed by various people. See README file. */
+#if defined(__ANDROID__) && !defined(PLATFORM_ANDROID)
+ /* __ANDROID__ macro is defined by Android NDK gcc. */
+# define PLATFORM_ANDROID 1
+#endif
+
/* First a unified test for Linux: */
# if (defined(linux) || defined(__linux__) || defined(PLATFORM_ANDROID)) \
&& !defined(LINUX) && !defined(__native_client__)