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

Side by Side Diff: runtime/platform/utils_fuchsia.h

Issue 2438843002: Fuchsia: Add native symbol resolver. Small fixes. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « runtime/bin/run_vm_tests_fuchsia.cc ('k') | runtime/vm/native_symbol_fuchsia.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #ifndef PLATFORM_UTILS_FUCHSIA_H_ 5 #ifndef PLATFORM_UTILS_FUCHSIA_H_
6 #define PLATFORM_UTILS_FUCHSIA_H_ 6 #define PLATFORM_UTILS_FUCHSIA_H_
7 7
8 #include <endian.h> 8 #include <endian.h>
9 9
10 namespace dart { 10 namespace dart {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return htole32(value); 55 return htole32(value);
56 } 56 }
57 57
58 58
59 inline uint64_t Utils::HostToLittleEndian64(uint64_t value) { 59 inline uint64_t Utils::HostToLittleEndian64(uint64_t value) {
60 return htole64(value); 60 return htole64(value);
61 } 61 }
62 62
63 63
64 inline char* Utils::StrError(int err, char* buffer, size_t bufsize) { 64 inline char* Utils::StrError(int err, char* buffer, size_t bufsize) {
65 snprintf(buffer, bufsize, "errno = %d", err); 65 if (strerror_r(err, buffer, bufsize) != 0) {
66 snprintf(buffer, bufsize, "%s", "strerror_r failed");
67 }
66 return buffer; 68 return buffer;
67 } 69 }
68 70
69 } // namespace dart 71 } // namespace dart
70 72
71 #endif // PLATFORM_UTILS_FUCHSIA_H_ 73 #endif // PLATFORM_UTILS_FUCHSIA_H_
OLDNEW
« no previous file with comments | « runtime/bin/run_vm_tests_fuchsia.cc ('k') | runtime/vm/native_symbol_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698