]> granicus.if.org Git - gc/commitdiff
Initial support of TIZEN platform
authorJonathan Chambers <joncham@gmail.com>
Mon, 15 Jan 2018 22:03:05 +0000 (01:03 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 15 Jan 2018 22:11:38 +0000 (01:11 +0300)
(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

index 9f2490defeae4a9bba63fb30f70bfd286024b774..90c65894fa1a0702a3a1d687a999e29b6b212634 100644 (file)
 # 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__
 #            define DYNAMIC_LOADING
 #            include <features.h>
 #            if defined(__GLIBC__) && __GLIBC__ >= 2 \
-                || defined(PLATFORM_ANDROID)
+                || defined(PLATFORM_ANDROID) || defined(PLATFORM_TIZEN)
 #                define SEARCH_FOR_DATA_START
 #            else
                  extern char **__environ;
 #            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  */
 #            define DYNAMIC_LOADING
 #            include <features.h>
 #            if defined(__GLIBC__) && __GLIBC__ >= 2 \
-                || defined(PLATFORM_ANDROID)
+                || defined(PLATFORM_ANDROID) || defined(PLATFORM_TIZEN)
 #                define SEARCH_FOR_DATA_START
 #            else
                  extern char **__environ;
 # 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 <unistd.h>
 # define GETPAGESIZE() (unsigned)sysconf(_SC_PAGESIZE)
 #endif
 #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