diff options
Diffstat (limited to 'src/google/protobuf/io/zero_copy_stream_unittest.cc')
-rw-r--r-- | src/google/protobuf/io/zero_copy_stream_unittest.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/google/protobuf/io/zero_copy_stream_unittest.cc b/src/google/protobuf/io/zero_copy_stream_unittest.cc index 235cbca4..f3754087 100644 --- a/src/google/protobuf/io/zero_copy_stream_unittest.cc +++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc @@ -47,9 +47,7 @@ // implementations. -#ifdef _MSC_VER -#include <io.h> -#else +#ifndef _MSC_VER #include <unistd.h> #endif #include <stdlib.h> @@ -72,6 +70,7 @@ #endif #include <google/protobuf/stubs/common.h> +#include <google/protobuf/stubs/io_win32.h> #include <google/protobuf/stubs/logging.h> #include <google/protobuf/testing/googletest.h> #include <google/protobuf/testing/file.h> @@ -84,6 +83,12 @@ namespace { #ifdef _WIN32 #define pipe(fds) _pipe(fds, 4096, O_BINARY) +// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import +// them like we do below. +using google::protobuf::internal::win32::access; +using google::protobuf::internal::win32::mkdir; +using google::protobuf::internal::win32::open; +using google::protobuf::internal::win32::close; #endif #ifndef O_BINARY |