| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_LINUX) | 6 #if defined(TARGET_OS_LINUX) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> // NOLINT | 10 #include <errno.h> // NOLINT |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 void OS::DebugBreak() { | 293 void OS::DebugBreak() { |
| 294 __builtin_trap(); | 294 __builtin_trap(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 char* OS::StrNDup(const char* s, intptr_t n) { | 298 char* OS::StrNDup(const char* s, intptr_t n) { |
| 299 return strndup(s, n); | 299 return strndup(s, n); |
| 300 } | 300 } |
| 301 | 301 |
| 302 | 302 |
| 303 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
| 304 return strnlen(s, n); |
| 305 } |
| 306 |
| 307 |
| 303 void OS::Print(const char* format, ...) { | 308 void OS::Print(const char* format, ...) { |
| 304 va_list args; | 309 va_list args; |
| 305 va_start(args, format); | 310 va_start(args, format); |
| 306 VFPrint(stdout, format, args); | 311 VFPrint(stdout, format, args); |
| 307 va_end(args); | 312 va_end(args); |
| 308 } | 313 } |
| 309 | 314 |
| 310 | 315 |
| 311 void OS::VFPrint(FILE* stream, const char* format, va_list args) { | 316 void OS::VFPrint(FILE* stream, const char* format, va_list args) { |
| 312 vfprintf(stream, format, args); | 317 vfprintf(stream, format, args); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 425 } |
| 421 | 426 |
| 422 | 427 |
| 423 void OS::Exit(int code) { | 428 void OS::Exit(int code) { |
| 424 exit(code); | 429 exit(code); |
| 425 } | 430 } |
| 426 | 431 |
| 427 } // namespace dart | 432 } // namespace dart |
| 428 | 433 |
| 429 #endif // defined(TARGET_OS_LINUX) | 434 #endif // defined(TARGET_OS_LINUX) |
| OLD | NEW |