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

Unified Diff: base/posix/safe_strerror.cc

Issue 1160373004: Move safe_strerror to posix directory and the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/posix/safe_strerror.h ('k') | base/safe_strerror_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/posix/safe_strerror.cc
diff --git a/base/safe_strerror_posix.cc b/base/posix/safe_strerror.cc
similarity index 98%
rename from base/safe_strerror_posix.cc
rename to base/posix/safe_strerror.cc
index 9da7aeef1190bd22aca5f203afd90bc5d9639cd3..e80e8f8bd98e2b8b7a13837b160fbc7963312845 100644
--- a/base/safe_strerror_posix.cc
+++ b/base/posix/safe_strerror.cc
@@ -10,13 +10,16 @@
#undef _GNU_SOURCE
#endif
-#include "build/build_config.h"
-#include "base/safe_strerror_posix.h"
+#include "base/posix/safe_strerror.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
+#include "build/build_config.h"
+
+namespace base {
+
#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(OS_NACL))
#if USE_HISTORICAL_STRERRO_R && defined(__GNUC__)
@@ -117,3 +120,5 @@ std::string safe_strerror(int err) {
safe_strerror_r(err, buf, sizeof(buf));
return std::string(buf);
}
+
+} // namespace base
« no previous file with comments | « base/posix/safe_strerror.h ('k') | base/safe_strerror_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698