Преглед изворни кода

Undef major/minor if they are defined as macro.

Feng Xiao пре 8 година
родитељ
комит
b7f25d42d3

+ 6 - 0
src/google/protobuf/compiler/command_line_interface.cc

@@ -37,6 +37,12 @@
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/types.h>
+#ifdef major
+#undef major
+#endif
+#ifdef minor
+#undef minor
+#endif
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <fcntl.h>
 #ifdef _MSC_VER
 #ifdef _MSC_VER

+ 8 - 1
src/google/protobuf/compiler/mock_code_generator.cc

@@ -40,7 +40,6 @@
 #endif
 #endif
 #include <vector>
 #include <vector>
 
 
-#include <google/protobuf/compiler/plugin.pb.h>
 #include <google/protobuf/stubs/logging.h>
 #include <google/protobuf/stubs/logging.h>
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/testing/file.h>
 #include <google/protobuf/testing/file.h>
@@ -54,6 +53,14 @@
 #include <google/protobuf/stubs/substitute.h>
 #include <google/protobuf/stubs/substitute.h>
 #include <gtest/gtest.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 google {
 namespace protobuf {
 namespace protobuf {
 namespace compiler {
 namespace compiler {