aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-03-09 13:50:31 -0800
committerGravatar GitHub <noreply@github.com>2017-03-09 13:50:31 -0800
commitaf2d5f5ad3808b38ea58c9880be1b81fd2a89278 (patch)
tree7abebda19e7491a40fcf5fb2db70ca0771e71609 /src/google/protobuf
parent9afacb44a30c3e625946be0fdde54f9c07349e40 (diff)
parentb7f25d42d3bd1b8cd9d995111e654a4601fe2ac8 (diff)
Merge pull request #2775 from xfxyjwf/fixmajor
Undef major/minor if they are defined as macro.
Diffstat (limited to 'src/google/protobuf')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc6
-rw-r--r--src/google/protobuf/compiler/mock_code_generator.cc9
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 {