| 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 "vm/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) |
| 7 |
| 5 #include "vm/os.h" | 8 #include "vm/os.h" |
| 6 | 9 |
| 7 #include <errno.h> | 10 #include <errno.h> // NOLINT |
| 8 #include <limits.h> | 11 #include <limits.h> // NOLINT |
| 9 #include <mach/mach.h> | 12 #include <mach/mach.h> // NOLINT |
| 10 #include <mach/clock.h> | 13 #include <mach/clock.h> // NOLINT |
| 11 #include <mach/mach_time.h> | 14 #include <mach/mach_time.h> // NOLINT |
| 12 #include <sys/time.h> | 15 #include <sys/time.h> // NOLINT |
| 13 #include <sys/resource.h> | 16 #include <sys/resource.h> // NOLINT |
| 14 #include <unistd.h> | 17 #include <unistd.h> // NOLINT |
| 15 | 18 |
| 16 #include "platform/utils.h" | 19 #include "platform/utils.h" |
| 17 #include "vm/isolate.h" | 20 #include "vm/isolate.h" |
| 18 | 21 |
| 19 namespace dart { | 22 namespace dart { |
| 20 | 23 |
| 21 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) { | 24 static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result) { |
| 22 time_t seconds = static_cast<time_t>(seconds_since_epoch); | 25 time_t seconds = static_cast<time_t>(seconds_since_epoch); |
| 23 if (seconds != seconds_since_epoch) return false; | 26 if (seconds != seconds_since_epoch) return false; |
| 24 struct tm* error_code = localtime_r(&seconds, tm_result); | 27 struct tm* error_code = localtime_r(&seconds, tm_result); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 void OS::Abort() { | 215 void OS::Abort() { |
| 213 abort(); | 216 abort(); |
| 214 } | 217 } |
| 215 | 218 |
| 216 | 219 |
| 217 void OS::Exit(int code) { | 220 void OS::Exit(int code) { |
| 218 exit(code); | 221 exit(code); |
| 219 } | 222 } |
| 220 | 223 |
| 221 } // namespace dart | 224 } // namespace dart |
| 225 |
| 226 #endif // defined(TARGET_OS_MACOS) |
| OLD | NEW |