| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 const char* Platform::OperatingSystem() { | 58 const char* Platform::OperatingSystem() { |
| 59 #if TARGET_OS_IOS | 59 #if TARGET_OS_IOS |
| 60 return "ios"; | 60 return "ios"; |
| 61 #else | 61 #else |
| 62 return "macos"; | 62 return "macos"; |
| 63 #endif | 63 #endif |
| 64 } | 64 } |
| 65 | 65 |
| 66 | 66 |
| 67 const char* Platform::LibraryPrefix() { |
| 68 return "lib"; |
| 69 } |
| 70 |
| 71 |
| 67 const char* Platform::LibraryExtension() { | 72 const char* Platform::LibraryExtension() { |
| 68 return "dylib"; | 73 return "dylib"; |
| 69 } | 74 } |
| 70 | 75 |
| 71 | 76 |
| 72 bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { | 77 bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { |
| 73 return gethostname(buffer, buffer_length) == 0; | 78 return gethostname(buffer, buffer_length) == 0; |
| 74 } | 79 } |
| 75 | 80 |
| 76 | 81 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 131 |
| 127 | 132 |
| 128 void Platform::Exit(int exit_code) { | 133 void Platform::Exit(int exit_code) { |
| 129 exit(exit_code); | 134 exit(exit_code); |
| 130 } | 135 } |
| 131 | 136 |
| 132 } // namespace bin | 137 } // namespace bin |
| 133 } // namespace dart | 138 } // namespace dart |
| 134 | 139 |
| 135 #endif // defined(TARGET_OS_MACOS) | 140 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |