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(TARGET_OS_MACOS) | 6 #if defined(TARGET_OS_MACOS) |
7 | 7 |
8 #include "bin/platform.h" | 8 #include "bin/platform.h" |
9 | 9 |
10 #if !TARGET_OS_IOS | 10 #if !TARGET_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 |
157 void Platform::Exit(int exit_code) { | 162 void Platform::Exit(int exit_code) { |
158 exit(exit_code); | 163 exit(exit_code); |
159 } | 164 } |
160 | 165 |
161 } // namespace bin | 166 } // namespace bin |
162 } // namespace dart | 167 } // namespace dart |
163 | 168 |
164 #endif // defined(TARGET_OS_MACOS) | 169 #endif // defined(TARGET_OS_MACOS) |
OLD | NEW |