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

Unified Diff: runtime/bin/file_system_watcher_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/file_system_watcher_macos.cc
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 2e24122b60b619c7a72a3b85d36c509badf9469b..3ebaf4f077329a4162721d77933aa0a0b9ab7e88 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -3,10 +3,10 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
-#if defined(TARGET_OS_MACOS)
-
#include "bin/file_system_watcher.h"
+#if defined(TARGET_OS_MACOS) && !defined(TARGET_OS_IOS)
Ivan Posva 2015/06/09 21:20:03 This will not work on the regular Dart builds as t
+
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
#include <unistd.h> // NOLINT
@@ -393,3 +393,43 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace dart
#endif // defined(TARGET_OS_MACOS)
+
+#if defined(TARGET_OS_IOS)
+
+namespace dart {
+namespace bin {
+
+// FSEvents are unavailable on iOS. Stub out related methods
+Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
+ return DartUtils::NewDartOSError();
+}
+
+intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
+ return -1;
+}
+
+bool FileSystemWatcher::IsSupported() {
+ return false;
+}
+
+void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
+}
+
+intptr_t FileSystemWatcher::Init() {
+ return -1;
+}
+
+void FileSystemWatcher::Close(intptr_t id) {
+}
+
+intptr_t FileSystemWatcher::WatchPath(intptr_t id,
+ const char* path,
+ int events,
+ bool recursive) {
+ return -1;
+}
+
+} // namespace bin
+} // namespace dart
+
+#endif // defined(TARGET_OS_IOS)

Powered by Google App Engine
This is Rietveld 408576698