Undef major/minor if they are defined as macro.

pull/2775/head
Feng Xiao 8 years ago
parent 5274d6ee31
commit b7f25d42d3
  1. 6
      src/google/protobuf/compiler/command_line_interface.cc
  2. 9
      src/google/protobuf/compiler/mock_code_generator.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

@ -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 {

Loading…
Cancel
Save