From aa1c57e8960c069cff7de137ed01c90cbfa57e91 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 19 Sep 2017 01:07:45 +0300 Subject: [PATCH] Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h * include/private/gcconfig.h [PLATFORM_ANDROID && !THREADS] (USE_GET_STACKBASE_FOR_MAIN): Move definition down to be after THREADS definition. --- include/private/gcconfig.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 45139dd..e217d9a 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2696,14 +2696,6 @@ # define DATAEND (__end__ != 0 ? (ptr_t)__end__ : (ptr_t)_end) #endif -#if defined(PLATFORM_ANDROID) && !defined(THREADS) \ - && !defined(USE_GET_STACKBASE_FOR_MAIN) - /* Always use pthread_attr_getstack on Android ("-lpthread" option is */ - /* not needed to be specified manually) since GC_linux_main_stack_base */ - /* causes app crash if invoked inside Dalvik VM. */ -# define USE_GET_STACKBASE_FOR_MAIN -#endif - #if (defined(SVR4) || defined(PLATFORM_ANDROID)) && !defined(GETPAGESIZE) # include # define GETPAGESIZE() (unsigned)sysconf(_SC_PAGESIZE) @@ -3032,6 +3024,14 @@ # define MIN_STACK_SIZE (8 * HBLKSIZE * sizeof(word)) #endif +#if defined(PLATFORM_ANDROID) && !defined(THREADS) \ + && !defined(USE_GET_STACKBASE_FOR_MAIN) + /* Always use pthread_attr_getstack on Android ("-lpthread" option is */ + /* not needed to be specified manually) since GC_linux_main_stack_base */ + /* causes app crash if invoked inside Dalvik VM. */ +# define USE_GET_STACKBASE_FOR_MAIN +#endif + #if defined(UNIX_LIKE) && defined(THREADS) && !defined(NO_CANCEL_SAFE) \ && !defined(PLATFORM_ANDROID) /* Make the code cancellation-safe. This basically means that we */ -- 2.7.4