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

Unified Diff: runtime/bin/file_android.cc

Issue 1450113003: Avoid strerror_r portability issues (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: oops namespace Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/eventhandler_macos.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_android.cc
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index 35b6388b6e5cdac208f37e8efab7718fb8689e98..cc29740f094e524cddef3672a836566e37de425c 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -19,6 +19,7 @@
#include "bin/log.h"
#include "platform/signal_blocker.h"
+#include "platform/utils.h"
namespace dart {
@@ -57,7 +58,7 @@ void File::Close() {
if (err != 0) {
const int kBufferSize = 1024;
char error_message[kBufferSize];
- strerror_r(errno, error_message, kBufferSize);
+ Utils::StrError(errno, error_message, kBufferSize);
Log::PrintErr("%s\n", error_message);
}
}
@@ -422,7 +423,7 @@ File::StdioHandleType File::GetStdioHandleType(int fd) {
if (result == -1) {
const int kBufferSize = 1024;
char error_message[kBufferSize];
- strerror_r(errno, error_message, kBufferSize);
+ Utils::StrError(errno, error_message, kBufferSize);
FATAL2("Failed stat on file descriptor %d: %s", fd, error_message);
}
if (S_ISCHR(buf.st_mode)) return kTerminal;
« no previous file with comments | « runtime/bin/eventhandler_macos.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698