Index: base/files/file_path.h |
diff --git a/base/files/file_path.h b/base/files/file_path.h |
index 25b8391c01094387ed583ad64cacb8a611790723..fba2f98ab692674f56e35d07d40ff370ff78f94f 100644 |
--- a/base/files/file_path.h |
+++ b/base/files/file_path.h |
@@ -124,6 +124,15 @@ |
#define FILE_PATH_USES_WIN_SEPARATORS |
#endif // OS_WIN |
+// To print path names portably use PRIsFP (based on PRIuS and friends from |
+// C99 and format_macros.h) like this: |
+// base::StringPrintf("Path is %" PRIsFP ".\n", path.value().c_str()); |
+#if defined(OS_POSIX) |
+#define PRIsFP "s" |
+#elif defined(OS_WIN) |
+#define PRIsFP "ls" |
+#endif // OS_WIN |
+ |
namespace base { |
class Pickle; |