diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc index fbecffa5cfb..5c0d43077a0 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 !TARGET_OS_IOS #include // NOLINT #include // 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 // !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 // !TARGET_OS_IOS #endif // defined(TARGET_OS_MACOS) diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc index e970d6e9572..54b48d6a071 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 !TARGET_OS_IOS #include // NOLINT -#endif // !defined(TARGET_OS_IOS) +#endif // !TARGET_OS_IOS #include // NOLINT #include // NOLINT #include // 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 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 bf81a8c31f6..f6949582e22 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 !TARGET_OS_IOS #include // NOLINT #endif #include // NOLINT @@ -451,7 +451,7 @@ class ProcessStarter { ReportChildError(); } -#if !defined(TARGET_OS_IOS) +#if !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 0d493100639..cd7b0587bab 100644 --- a/runtime/platform/globals.h +++ b/runtime/platform/globals.h @@ -94,8 +94,8 @@ // TODO(iposva): Rename TARGET_OS_MACOS to TARGET_OS_MAC to inherit // the value defined in TargetConditionals.h #define TARGET_OS_MACOS 1 -#if TARGET_OS_IPHONE -#define TARGET_OS_IOS +#if TARGET_OS_IPHONE && !defined(TARGET_OS_IOS) +#define 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) || 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) || 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) || TARGET_OS_IOS #define USING_SIMULATOR 1 #endif diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc index a447e4187e6..aed5d33529b 100644 --- a/runtime/vm/os_macos.cc +++ b/runtime/vm/os_macos.cc @@ -15,7 +15,7 @@ #include // NOLINT #include // NOLINT #include // NOLINT -#if defined(TARGET_OS_IOS) +#if TARGET_OS_IOS #include #endif @@ -86,7 +86,7 @@ int64_t OS::GetCurrentTimeMicros() { int64_t OS::GetCurrentTraceMicros() { -#if defined(TARGET_OS_IOS) +#if TARGET_OS_IOS // On iOS mach_absolute_time stops while the device is sleeping. Instead use // now - KERN_BOOTTIME to get a time difference that is not impacted by clock // changes. KERN_BOOTTIME will be updated by the system whenever the system @@ -118,7 +118,7 @@ int64_t OS::GetCurrentTraceMicros() { result *= timebase_info.numer; result /= timebase_info.denom; return result; -#endif // defined(TARGET_OS_IOS) +#endif // TARGET_OS_IOS }