From d61aede89cf188367766b971f59cf57d7835d8e8 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Tue, 4 Sep 2018 10:58:54 -0700 Subject: Down-integrate from google3. --- src/google/protobuf/compiler/command_line_interface.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/google/protobuf/compiler/command_line_interface.cc') diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 80056774..4d1ef09b 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -84,6 +84,8 @@ #include +#include + namespace google { namespace protobuf { namespace compiler { @@ -169,7 +171,8 @@ bool VerifyDirectoryExists(const string& path) { bool TryCreateParentDirectory(const string& prefix, const string& filename) { // Recursively create parent directories to the output file. // On Windows, both '/' and '\' are valid path separators. - std::vector parts = Split(filename, "/\\", true); + std::vector parts = + Split(filename, "/\\", true); string path_so_far = prefix; for (int i = 0; i < parts.size() - 1; i++) { path_so_far += parts[i]; @@ -1546,7 +1549,7 @@ CommandLineInterface::InterpretArgument(const string& name, std::cout << version_info_ << std::endl; } std::cout << "libprotoc " - << protobuf::internal::VersionString(GOOGLE_PROTOBUF_VERSION) + << protobuf::internal::VersionString(PROTOBUF_VERSION) << std::endl; return PARSE_ARGUMENT_DONE_AND_EXIT; // Exit without running compiler. @@ -1932,10 +1935,10 @@ bool CommandLineInterface::GeneratePluginOutput( google::protobuf::compiler::Version* version = request.mutable_compiler_version(); - version->set_major(GOOGLE_PROTOBUF_VERSION / 1000000); - version->set_minor(GOOGLE_PROTOBUF_VERSION / 1000 % 1000); - version->set_patch(GOOGLE_PROTOBUF_VERSION % 1000); - version->set_suffix(GOOGLE_PROTOBUF_VERSION_SUFFIX); + version->set_major(PROTOBUF_VERSION / 1000000); + version->set_minor(PROTOBUF_VERSION / 1000 % 1000); + version->set_patch(PROTOBUF_VERSION % 1000); + version->set_suffix(PROTOBUF_VERSION_SUFFIX); // Invoke the plugin. Subprocess subprocess; -- cgit v1.2.3