Skip to content

Instantly share code, notes, and snippets.

@abarth
Created September 27, 2015 05:33
Show Gist options
  • Save abarth/8942a1d5b3028003f235 to your computer and use it in GitHub Desktop.
Save abarth/8942a1d5b3028003f235 to your computer and use it in GitHub Desktop.
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index fbecffa5..3b4ea99 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -7,7 +7,7 @@
#include "bin/file_system_watcher.h"
-#if !defined(TARGET_OS_IOS)
+#if !defined(DART_TARGET_OS_IOS)
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
@@ -394,7 +394,7 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
-#else // !defined(TARGET_OS_IOS)
+#else // !defined(DART_TARGET_OS_IOS)
namespace dart {
namespace bin {
@@ -432,6 +432,6 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
} // namespace bin
} // namespace dart
-#endif // !defined(TARGET_OS_IOS)
+#endif // !defined(DART_TARGET_OS_IOS)
#endif // defined(TARGET_OS_MACOS)
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index e970d6e..9b7184f 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -12,9 +12,9 @@
#include "bin/file.h"
#include "bin/platform.h"
-#if !defined(TARGET_OS_IOS)
+#if !defined(DART_TARGET_OS_IOS)
#include <crt_externs.h> // NOLINT
-#endif // !defined(TARGET_OS_IOS)
+#endif // !defined(DART_TARGET_OS_IOS)
#include <signal.h> // NOLINT
#include <string.h> // NOLINT
#include <unistd.h> // NOLINT
@@ -68,7 +68,7 @@ bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) {
char** Platform::Environment(intptr_t* count) {
-#if defined(TARGET_OS_IOS)
+#if defined(DART_TARGET_OS_IOS)
// TODO(iposva): On Mac (desktop), _NSGetEnviron() is used to access the
// environ from shared libraries or bundles. This is present in crt_externs.h
// which is unavailable on iOS. On iOS, everything is statically linked for
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index bf81a8c..a7a84e4 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -7,7 +7,7 @@
#include "bin/process.h"
-#if !defined(TARGET_OS_IOS)
+#if !defined(DART_TARGET_OS_IOS)
#include <crt_externs.h> // NOLINT
#endif
#include <errno.h> // NOLINT
@@ -451,7 +451,7 @@ class ProcessStarter {
ReportChildError();
}
-#if !defined(TARGET_OS_IOS)
+#if !defined(DART_TARGET_OS_IOS)
if (program_environment_ != NULL) {
// On MacOS you have to do a bit of magic to get to the
// environment strings.
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 0d49310..2e86c82 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -95,7 +95,7 @@
// the value defined in TargetConditionals.h
#define TARGET_OS_MACOS 1
#if TARGET_OS_IPHONE
-#define TARGET_OS_IOS
+#define DART_TARGET_OS_IOS 1
#endif
#elif defined(_WIN32)
@@ -279,17 +279,17 @@ typedef simd128_value_t fpu_register_t;
#elif defined(TARGET_ARCH_X64)
// No simulator used.
#elif defined(TARGET_ARCH_ARM)
-#if !defined(HOST_ARCH_ARM) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_ARM) || defined(DART_TARGET_OS_IOS)
#define USING_SIMULATOR 1
#endif
#elif defined(TARGET_ARCH_ARM64)
-#if !defined(HOST_ARCH_ARM64) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_ARM64) || defined(DART_TARGET_OS_IOS)
#define USING_SIMULATOR 1
#endif
#elif defined(TARGET_ARCH_MIPS)
-#if !defined(HOST_ARCH_MIPS) || defined(TARGET_OS_IOS)
+#if !defined(HOST_ARCH_MIPS) || defined(DART_TARGET_OS_IOS)
#define USING_SIMULATOR 1
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment