[runtime] Compile fixes for WatchOS.
authorJoão Matos <joao@tritao.eu>
Fri, 24 Jul 2015 18:55:29 +0000 (19:55 +0100)
committerJoão Matos <joao@tritao.eu>
Fri, 24 Jul 2015 18:58:58 +0000 (19:58 +0100)
mono/mini/exceptions-x86.c
mono/mini/mini-arm.h
mono/mini/mini-posix.c
mono/mini/mini-x86.h
mono/utils/mono-context.c

index 778c5291a9613c53e6643b896a853edb819e67ef..3b4b21c1dffd861d6bb9870786fa18283645983a 100644 (file)
@@ -884,7 +884,7 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls,
 gpointer
 mono_arch_ip_from_context (void *sigctx)
 {
-#if defined(__native_client__)
+#if defined(__native_client__) || defined(HOST_WATCHOS)
        printf("WARNING: mono_arch_ip_from_context() called!\n");
        return (NULL);
 #elif defined(MONO_ARCH_USE_SIGACTION)
index 3b325221790cde896d47a7b5c84d60bb465f4eff..5135fcbb94808cdea4d403716a883cdd7b2326fd 100644 (file)
@@ -254,7 +254,7 @@ typedef struct MonoCompileArch {
 
 #define MONO_ARCH_USE_SIGACTION 1
 
-#if defined(__native_client__)
+#if defined(__native_client__) || defined(HOST_WATCHOS)
 #undef MONO_ARCH_USE_SIGACTION
 #endif
 
index cfb8461d4e3d16e30ff12c51f3f60a385cc0b781..5bc983ae8cd6582787768fb692e4682291758291 100644 (file)
@@ -68,7 +68,7 @@
 
 #include "jit-icalls.h"
 
-#if defined(__native_client__)
+#if defined(__native_client__) || defined(HOST_WATCHOS)
 
 void
 mono_runtime_setup_stat_profiler (void)
@@ -89,10 +89,12 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal)
        return FALSE;
 }
 
+#ifndef PLATFORM_MACOSX
 void
 mono_runtime_install_handlers (void)
 {
 }
+#endif
 
 void
 mono_runtime_shutdown_handlers (void)
@@ -104,6 +106,7 @@ mono_runtime_cleanup_handlers (void)
 {
 }
 
+#if !defined(PLATFORM_MACOSX)
 pid_t
 mono_runtime_syscall_fork (void)
 {
@@ -115,6 +118,7 @@ void
 mono_gdb_render_native_backtraces (pid_t crashed_pid)
 {
 }
+#endif
 
 #else
 
@@ -389,7 +393,7 @@ add_signal_handler (int signo, gpointer handler)
 #ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK
 
 /*Apple likes to deliver SIGBUS for *0 */
-#ifdef __APPLE__
+#ifdef PLATFORM_MACOSX
        if (signo == SIGSEGV || signo == SIGBUS) {
 #else
        if (signo == SIGSEGV) {
@@ -628,7 +632,7 @@ mono_runtime_setup_stat_profiler (void)
 #endif
 }
 
-#if !defined(__APPLE__)
+#if !defined(PLATFORM_MACOSX)
 pid_t
 mono_runtime_syscall_fork ()
 {
index 713ca9810004f947b1952d79d278d70c21b0c519..149cbd1198f99408ec2ba91b878e367fdccd3783 100644 (file)
@@ -52,7 +52,7 @@ struct sigcontext {
 #define MONO_ARCH_USE_SIGACTION
 #endif
 
-#if defined(__native_client__)
+#if defined(__native_client__) || defined(HOST_WATCHOS)
 #undef MONO_ARCH_USE_SIGACTION
 #endif
 
index a05c7bab76d9e0d1701bd879e4abf7f2311f1a55..b796c81ec7be686242fece021f587e6b3888f0e3 100644 (file)
@@ -34,7 +34,7 @@
 void
 mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
 {
-#if defined (__native_client__)
+#if defined (__native_client__) || defined (HOST_WATCHOS)
        printf("WARNING: mono_arch_sigctx_to_monoctx() called!\n");
        mctx->eax = 0xDEADBEEF;
        mctx->ebx = 0xDEADBEEF;
@@ -87,7 +87,7 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
 void
 mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
 {
-#if defined(__native_client__)
+#if defined(__native_client__) || defined(HOST_WATCHOS)
        printf("WARNING: mono_arch_monoctx_to_sigctx() called!\n");
 #elif defined(MONO_SIGNAL_USE_SIGACTION)
        ucontext_t *ctx = (ucontext_t*)sigctx;