Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: runtime/bin/platform_macos.cc

Issue 1171223003: Add stubs in platform_macos and file_system_watcher_macos for building the same (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/platform_macos.cc
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index 351a829db717d47f0f0159d62b39fc06ddba3635..6e006c08a7c3f760488f9b9650d2dfc19bc2acf1 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -3,14 +3,16 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
-#if defined(TARGET_OS_MACOS)
+#if defined(TARGET_OS_MACOS) || defined(TARGET_OS_IOS)
Ivan Posva 2015/06/09 21:20:03 Please note that TARGET_OS_IOS also automatically
#include <mach-o/dyld.h>
#include "bin/file.h"
#include "bin/platform.h"
+#if !defined(TARGET_OS_IOS)
#include <crt_externs.h> // NOLINT
+#endif
#include <signal.h> // NOLINT
#include <string.h> // NOLINT
#include <unistd.h> // NOLINT
@@ -57,6 +59,9 @@ bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) {
char** Platform::Environment(intptr_t* count) {
+#if defined(TARGET_OS_IOS)
+ return NULL;
Ivan Posva 2015/06/09 21:20:03 Is there really no way to access environment varia
+#else
// Using environ directly is only safe as long as we do not
// provide access to modifying environment variables.
// On MacOS you have to do a bit of magic to get to the
@@ -71,6 +76,7 @@ char** Platform::Environment(intptr_t* count) {
result[current] = environ[current];
}
return result;
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698