Skip to content

Commit

Permalink
[tvOS] cleanup defines for tvOS (#12539)
Browse files Browse the repository at this point in the history
Fixes #11697
  • Loading branch information
lewurm committed Jan 21, 2019
1 parent cbfd736 commit aa0f15f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion mono/metadata/mono-route.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mono/mini/mini-amd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mono/mini/mini-arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions mono/native/pal-icalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) */
2 changes: 1 addition & 1 deletion mono/utils/mono-context.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
6 changes: 3 additions & 3 deletions mono/utils/mono-threads-mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions sdks/builds/ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 = \
Expand Down
2 changes: 1 addition & 1 deletion support/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit aa0f15f

Please sign in to comment.