From a3a5949d7e885e4795a3ae9f4968fc4030ef9d5c Mon Sep 17 00:00:00 2001 From: Jonathan Chambers Date: Tue, 16 Jan 2018 01:03:05 +0300 Subject: [PATCH] Initial support of TIZEN platform (part of commit 9379c66 from Unity-Technologies/bdwgc) Issue #173 (bdwgc). * include/private/gcconfig.h [TIZEN] (PLATFORM_TIZEN): New macro. * include/private/gcconfig.h [I386 && LINUX && __ELF__ && PLATFORM_TIZEN] (SEARCH_FOR_DATA_START, GC_NO_SIGSETJMP): Define. * include/private/gcconfig.h [ARM32 && LINUX && __ELF__ && PLATFORM_TIZEN] (SEARCH_FOR_DATA_START): Likewise. * include/private/gcconfig.h [PLATFORM_TIZEN && !GETPAGESIZE] (GETPAGESIZE): Define to sysconf(_SC_PAGESIZE). * include/private/gcconfig.h [CAN_HANDLE_FORK] (CAN_CALL_ATFORK): Do not define if PLATFORM_TIZEN. --- include/private/gcconfig.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 9f2490de..90c65894 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -67,6 +67,10 @@ # define PLATFORM_ANDROID 1 #endif +#if defined(TIZEN) && !defined(PLATFORM_TIZEN) +# define PLATFORM_TIZEN 1 +#endif + #if defined(__SYMBIAN32__) && !defined(SYMBIAN) # define SYMBIAN # ifdef __WINS__ @@ -1387,7 +1391,7 @@ # define DYNAMIC_LOADING # include # if defined(__GLIBC__) && __GLIBC__ >= 2 \ - || defined(PLATFORM_ANDROID) + || defined(PLATFORM_ANDROID) || defined(PLATFORM_TIZEN) # define SEARCH_FOR_DATA_START # else extern char **__environ; @@ -1403,9 +1407,10 @@ # endif extern int _end[]; # define DATAEND ((ptr_t)(_end)) -# if defined(PLATFORM_ANDROID) && !defined(GC_NO_SIGSETJMP) \ - && !(GC_GNUC_PREREQ(4, 8) || GC_CLANG_PREREQ(3, 2) \ - || __ANDROID_API__ >= 18) +# if !defined(GC_NO_SIGSETJMP) && (defined(PLATFORM_TIZEN) \ + || (defined(PLATFORM_ANDROID) \ + && !(GC_GNUC_PREREQ(4, 8) || GC_CLANG_PREREQ(3, 2) \ + || __ANDROID_API__ >= 18))) /* Older Android NDK releases lack sigsetjmp in x86 libc */ /* (setjmp is used instead to find data_start). The bug */ /* is fixed in Android NDK r8e (so, ok to use sigsetjmp */ @@ -2214,7 +2219,7 @@ # define DYNAMIC_LOADING # include # if defined(__GLIBC__) && __GLIBC__ >= 2 \ - || defined(PLATFORM_ANDROID) + || defined(PLATFORM_ANDROID) || defined(PLATFORM_TIZEN) # define SEARCH_FOR_DATA_START # else extern char **__environ; @@ -2696,7 +2701,8 @@ # define DATAEND (__end__ != 0 ? (ptr_t)__end__ : (ptr_t)_end) #endif -#if (defined(SVR4) || defined(PLATFORM_ANDROID)) && !defined(GETPAGESIZE) +#if (defined(SVR4) || defined(PLATFORM_ANDROID) || defined(PLATFORM_TIZEN)) \ + && !defined(GETPAGESIZE) # include # define GETPAGESIZE() (unsigned)sysconf(_SC_PAGESIZE) #endif @@ -3084,7 +3090,7 @@ #endif #if defined(CAN_HANDLE_FORK) && !defined(CAN_CALL_ATFORK) \ - && !defined(HURD) \ + && !defined(HURD) && !defined(PLATFORM_TIZEN) \ && (!defined(PLATFORM_ANDROID) || __ANDROID_API__ >= 21) /* Have working pthread_atfork(). */ # define CAN_CALL_ATFORK -- 2.50.1