Commit bc1f2e7e authored by Jisi Liu's avatar Jisi Liu

Fix WIN32 build for map_test.

stubs/common.h undefines the GetMessage macro introduced in windows.h
map_test however include stubs/common.h before windows.h is transitively
included. This hack force map_test.cc to include windows.h first, so we
have a chance to undefine the GetMessage macro.
parent cbfd9d43
......@@ -28,6 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// A hack to include windows.h first, which ensures the GetMessage macro can
// be undefined when we include <google/protobuf/stubs/common.h>
#if defined(_WIN32)
#include <windows.h>
#endif // _WIN32
#include <algorithm>
#include <google/protobuf/stubs/hash.h>
#include <map>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment