diff options
Diffstat (limited to 'third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc')
-rw-r--r-- | third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc b/third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc index bb168d5241..9b5e103ae8 100644 --- a/third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc +++ b/third_party/protobuf/3.2.0/src/google/protobuf/compiler/importer.cc @@ -32,7 +32,9 @@ // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. -#ifndef _MSC_VER +#ifdef _MSC_VER +#include <direct.h> +#else #include <unistd.h> #endif #include <sys/types.h> @@ -54,14 +56,18 @@ #include <google/protobuf/stubs/io_win32.h> #include <google/protobuf/stubs/strutil.h> -namespace google { -namespace protobuf { -namespace compiler { - #ifdef _WIN32 #include <ctype.h> +// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import +// them like we do below. +using google::protobuf::stubs::access; +using google::protobuf::stubs::open; #endif +namespace google { +namespace protobuf { +namespace compiler { + // Returns true if the text looks like a Windows-style absolute path, starting // with a drive letter. Example: "C:\foo". TODO(kenton): Share this with // copy in command_line_interface.cc? @@ -218,6 +224,7 @@ void Importer::ClearUnusedImportTrackFiles() { pool_.ClearUnusedImportTrackFiles(); } + // =================================================================== SourceTree::~SourceTree() {} |