OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "platform/globals.h" | 5 #include "platform/globals.h" |
6 #if defined(HOST_OS_MACOS) | 6 #if defined(HOST_OS_MACOS) |
7 | 7 |
8 #include "bin/platform.h" | 8 #include "bin/platform.h" |
9 | 9 |
10 #if !HOST_OS_IOS | 10 #if !HOST_OS_IOS |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 char* path = DartUtils::ScopedCString(path_size); | 147 char* path = DartUtils::ScopedCString(path_size); |
148 if (_NSGetExecutablePath(path, &path_size) != 0) { | 148 if (_NSGetExecutablePath(path, &path_size) != 0) { |
149 return NULL; | 149 return NULL; |
150 } | 150 } |
151 // Return the canonical path as the returned path might contain symlinks. | 151 // Return the canonical path as the returned path might contain symlinks. |
152 const char* canon_path = File::GetCanonicalPath(path); | 152 const char* canon_path = File::GetCanonicalPath(path); |
153 return canon_path; | 153 return canon_path; |
154 } | 154 } |
155 | 155 |
156 | 156 |
157 bool Platform::AnsiSupported() { | |
158 return true; | |
159 } | |
160 | |
161 | |
162 void Platform::Exit(int exit_code) { | 157 void Platform::Exit(int exit_code) { |
163 exit(exit_code); | 158 exit(exit_code); |
164 } | 159 } |
165 | 160 |
166 } // namespace bin | 161 } // namespace bin |
167 } // namespace dart | 162 } // namespace dart |
168 | 163 |
169 #endif // defined(HOST_OS_MACOS) | 164 #endif // defined(HOST_OS_MACOS) |
OLD | NEW |