Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1071)

Side by Side Diff: runtime/vm/os_android.cc

Issue 1989513002: strnlen is not always available. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « runtime/vm/os.h ('k') | runtime/vm/os_linux.cc » ('j') | runtime/vm/os_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698