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_ANDROID) | 6 #if defined(TARGET_OS_ANDROID) |
7 | 7 |
8 #include "vm/os.h" | 8 #include "vm/os.h" |
9 | 9 |
10 #include <android/log.h> // NOLINT | 10 #include <android/log.h> // NOLINT |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 void OS::DebugBreak() { | 281 void OS::DebugBreak() { |
282 __builtin_trap(); | 282 __builtin_trap(); |
283 } | 283 } |
284 | 284 |
285 | 285 |
286 char* OS::StrNDup(const char* s, intptr_t n) { | 286 char* OS::StrNDup(const char* s, intptr_t n) { |
287 return strndup(s, n); | 287 return strndup(s, n); |
288 } | 288 } |
289 | 289 |
290 | 290 |
| 291 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
| 292 return strnlen(s, n); |
| 293 } |
| 294 |
| 295 |
291 uint16_t HostToBigEndian16(uint16_t value) { | 296 uint16_t HostToBigEndian16(uint16_t value) { |
292 return htobe16(value); | 297 return htobe16(value); |
293 } | 298 } |
294 | 299 |
295 | 300 |
296 uint32_t HostToBigEndian32(uint32_t value) { | 301 uint32_t HostToBigEndian32(uint32_t value) { |
297 return htobe32(value); | 302 return htobe32(value); |
298 } | 303 } |
299 | 304 |
300 | 305 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 } | 447 } |
443 | 448 |
444 | 449 |
445 void OS::Exit(int code) { | 450 void OS::Exit(int code) { |
446 exit(code); | 451 exit(code); |
447 } | 452 } |
448 | 453 |
449 } // namespace dart | 454 } // namespace dart |
450 | 455 |
451 #endif // defined(TARGET_OS_ANDROID) | 456 #endif // defined(TARGET_OS_ANDROID) |
OLD | NEW |