diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-03-01 01:45:54 +0000 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2017-02-28 18:13:04 -0800 |
commit | b7f25d42d3bd1b8cd9d995111e654a4601fe2ac8 (patch) | |
tree | 2522dd426f08e798ed8470782fa543a6d317384c | |
parent | 5274d6ee314a237f6626b5b4633c9f87574ad46d (diff) |
Undef major/minor if they are defined as macro.
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface.cc | 6 | ||||
-rw-r--r-- | src/google/protobuf/compiler/mock_code_generator.cc | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc index 1914fc48..621d98c5 100644 --- a/src/google/protobuf/compiler/command_line_interface.cc +++ b/src/google/protobuf/compiler/command_line_interface.cc @@ -37,6 +37,12 @@ #include <stdio.h> #include <sys/types.h> +#ifdef major +#undef major +#endif +#ifdef minor +#undef minor +#endif #include <sys/stat.h> #include <fcntl.h> #ifdef _MSC_VER diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc index e82e6ae1..a4b522ce 100644 --- a/src/google/protobuf/compiler/mock_code_generator.cc +++ b/src/google/protobuf/compiler/mock_code_generator.cc @@ -40,7 +40,6 @@ #endif #include <vector> -#include <google/protobuf/compiler/plugin.pb.h> #include <google/protobuf/stubs/logging.h> #include <google/protobuf/stubs/common.h> #include <google/protobuf/testing/file.h> @@ -54,6 +53,14 @@ #include <google/protobuf/stubs/substitute.h> #include <gtest/gtest.h> +#ifdef major +#undef major +#endif +#ifdef minor +#undef minor +#endif +#include <google/protobuf/compiler/plugin.pb.h> + namespace google { namespace protobuf { namespace compiler { |