Merge "Revert "Introduce unique_fd"" into nyc-dev
am: 263d140895

* commit '263d140895f0e61cda27301a21e4ce18651d4eb4':
  Revert "Introduce unique_fd"
diff --git a/file.cpp b/file.cpp
index bcdfc5e..da1adba 100644
--- a/file.cpp
+++ b/file.cpp
@@ -29,10 +29,6 @@
 #include "cutils/log.h"
 #include "utils/Compat.h"
 
-#if !defined(_WIN32)
-#define O_BINARY 0
-#endif
-
 namespace android {
 namespace base {
 
diff --git a/include/android-base/file.h b/include/android-base/file.h
index 486befc..5342d98 100644
--- a/include/android-base/file.h
+++ b/include/android-base/file.h
@@ -20,6 +20,10 @@
 #include <sys/stat.h>
 #include <string>
 
+#if !defined(_WIN32) && !defined(O_BINARY)
+#define O_BINARY 0
+#endif
+
 namespace android {
 namespace base {
 
diff --git a/test_utils.cpp b/test_utils.cpp
index 337ba7c..635af6c 100644
--- a/test_utils.cpp
+++ b/test_utils.cpp
@@ -16,7 +16,6 @@
 
 #include "android-base/logging.h"
 #include "android-base/test_utils.h"
-#include "utils/Compat.h" // For OS_PATH_SEPARATOR.
 
 #include <fcntl.h>
 #include <stdio.h>
@@ -27,6 +26,9 @@
 #if defined(_WIN32)
 #include <windows.h>
 #include <direct.h>
+#define OS_PATH_SEPARATOR '\\'
+#else
+#define OS_PATH_SEPARATOR '/'
 #endif
 
 #include <string>