Răsfoiți Sursa

[tvOS] cleanup defines for tvOS (#12539)

Fixes https://github.com/mono/mono/issues/11697
Bernhard Urban 7 ani în urmă
părinte
comite
aa0f15fdca

+ 1 - 1
mono/metadata/mono-route.h

@@ -10,7 +10,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>		/* in_addr_t */
 
-#if defined (HOST_IOS) || defined (HOST_WATCHOS) || defined (HOST_APPLETVOS)
+#if defined (HOST_IOS) || defined (HOST_WATCHOS) || defined (HOST_TVOS)
 // The iOS SDK does not provide the net/route.h header but using the Darwin version works fine.
 #include "../../support/ios/net/route.h"
 #else

+ 1 - 1
mono/mini/mini-amd64.h

@@ -473,7 +473,7 @@ typedef struct {
 #define MONO_ARCH_GSHAREDVT_SUPPORTED 1
 
 
-#if defined(TARGET_APPLETVOS)
+#if defined(HOST_TVOS)
 /* No signals */
 #define MONO_ARCH_NEED_DIV_CHECK 1
 #endif

+ 2 - 2
mono/mini/mini-arm64.h

@@ -140,7 +140,7 @@ typedef struct {
 #define MONO_ARCH_HAVE_GENERALIZED_IMT_TRAMPOLINE 1
 #define MONO_ARCH_USE_SIGACTION 1
 #define MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX 1
-#ifdef TARGET_APPLETVOS
+#ifdef HOST_TVOS
 #define MONO_ARCH_HAS_NO_PROPER_MONOCTX 1
 #endif
 #define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1
@@ -183,7 +183,7 @@ typedef struct {
 
 #endif
 
-#if defined(TARGET_APPLETVOS) || defined(TARGET_IOS)
+#if defined(TARGET_IOS)
 #define MONO_ARCH_HAVE_UNWIND_BACKTRACE 1
 #endif
 

+ 2 - 2
mono/native/pal-icalls.c

@@ -6,7 +6,7 @@
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 */
 
-#if !defined (HOST_WATCHOS) && !defined (TARGET_APPLETVOS) /* These platforms don't support async suspend and do not need this code for now */
+#if !defined (HOST_WATCHOS) && !defined (HOST_TVOS) /* These platforms don't support async suspend and do not need this code for now */
 
 #include <config.h>
 #include <glib.h>
@@ -80,4 +80,4 @@ ves_icall_Interop_RunLoop_CFRunLoopRun (void)
 
 #endif
 
-#endif /* !defined (HOST_WATCHOS) && !defined (TARGET_APPLETVOS) */
+#endif /* !defined (HOST_WATCHOS) && !defined (HOST_TVOS) */

+ 1 - 1
mono/utils/mono-context.h

@@ -476,7 +476,7 @@ typedef struct {
 #define MONO_CONTEXT_GET_BP(ctx) (gpointer)(gsize)((ctx)->regs [ARMREG_FP])
 #define MONO_CONTEXT_GET_SP(ctx) (gpointer)(gsize)((ctx)->regs [ARMREG_SP])
 
-#if defined (HOST_APPLETVOS)
+#if defined (HOST_TVOS)
 
 #define MONO_CONTEXT_GET_CURRENT(ctx) do { \
 	arm_unified_thread_state_t thread_state;	\

+ 3 - 3
mono/utils/mono-threads-mach.c

@@ -33,7 +33,7 @@ mono_threads_suspend_init (void)
 	mono_threads_init_dead_letter ();
 }
 
-#if defined(HOST_WATCHOS) || defined(HOST_TVOS)
+#if defined(HOST_WATCHOS)
 
 gboolean
 mono_threads_suspend_begin_async_suspend (MonoThreadInfo *info, gboolean interrupt_kernel)
@@ -58,7 +58,7 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
 {
 }
 
-#else /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */
+#else /* defined(HOST_WATCHOS) */
 
 gboolean
 mono_threads_suspend_begin_async_suspend (MonoThreadInfo *info, gboolean interrupt_kernel)
@@ -192,7 +192,7 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
 	g_assert (ret == KERN_SUCCESS);
 }
 
-#endif /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */
+#endif /* defined(HOST_WATCHOS) */
 
 void
 mono_threads_suspend_register (MonoThreadInfo *info)

+ 2 - 2
sdks/builds/ios.mk

@@ -129,7 +129,7 @@ ios-targetwatch64_32_SYSROOT = $(watchos5_sysroot)
 ios-target32_CPPFLAGS = -DHOST_IOS
 ios-target32s_CPPFLAGS = -DHOST_IOS
 ios-target64_CPPFLAGS = -DHOST_IOS
-ios-targettv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
+ios-targettv_CPPFLAGS = -DHOST_IOS -DHOST_TVOS
 ios-targetwatch_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
 ios-targetwatch64_32_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
 
@@ -255,7 +255,7 @@ ios-simwatch_CONFIGURE_FLAGS = --enable-cooperative-suspend
 
 ios-sim32_CPPFLAGS = -DHOST_IOS
 ios-sim64_CPPFLAGS = -DHOST_IOS
-ios-simtv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
+ios-simtv_CPPFLAGS = -DHOST_IOS -DHOST_TVOS
 ios-simwatch_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
 
 ios-simtv_AC_VARS = \

+ 1 - 1
support/serial.c

@@ -34,7 +34,7 @@
 
 /* sys/time.h (for timeval) is required when using osx 10.3 (but not 10.4) */
 /* IOKit is a private framework in iOS, so exclude there */
-#if defined(__APPLE__) && !defined(HOST_IOS) && !defined(HOST_WATCHOS) && !defined(HOST_APPLETVOS)
+#if defined(__APPLE__) && !defined(HOST_IOS) && !defined(HOST_WATCHOS) && !defined(HOST_TVOS)
 #define HAVE_IOKIT 1
 #endif