diff --git a/src/google/protobuf/compiler/importer.cc b/src/google/protobuf/compiler/importer.cc index 4b38df4e04..7a84e7d604 100644 --- a/src/google/protobuf/compiler/importer.cc +++ b/src/google/protobuf/compiler/importer.cc @@ -11,6 +11,8 @@ #include "google/protobuf/compiler/importer.h" +#include + #ifdef _MSC_VER #include #else @@ -21,21 +23,27 @@ #include #include -#include #include #include #include "absl/strings/match.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" -#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "google/protobuf/compiler/parser.h" -#include "google/protobuf/io/io_win32.h" #include "google/protobuf/io/tokenizer.h" #include "google/protobuf/io/zero_copy_stream_impl.h" +#ifdef _WIN32 +#include "absl/strings/str_replace.h" +#include "google/protobuf/io/io_win32.h" +#endif + +#if defined(_WIN32) || defined(__CYGWIN__) +#include "absl/strings/ascii.h" +#endif + namespace google { namespace protobuf { namespace compiler { @@ -47,10 +55,6 @@ using google::protobuf::io::win32::access; using google::protobuf::io::win32::open; #endif -#if defined(_WIN32) || defined(__CYGWIN__) -#include "absl/strings/ascii.h" -#endif - // Returns true if the text looks like a Windows-style absolute path, starting // with a drive letter. Example: "C:\foo". TODO: Share this with // copy in command_line_interface.cc?