From 9b58372a38e77ed61240c0e6588c3cfd38a784d1 Mon Sep 17 00:00:00 2001 From: Ivan Pechorin Date: Wed, 26 Sep 2012 16:09:55 +0400 Subject: [PATCH] Fix compilation using MSVC 2008: its defines wrong min/max without NOMINMAX Visual Studio 2008 compiler defines min/max as macros in its even if is not included at all. This patch defines NOMINMAX to remove these macros and fix compilation on Visual Studio 2008. --- src/encoder.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/encoder.hpp b/src/encoder.hpp index 04068ff1..4c299f1b 100644 --- a/src/encoder.hpp +++ b/src/encoder.hpp @@ -22,6 +22,12 @@ #ifndef __ZMQ_ENCODER_HPP_INCLUDED__ #define __ZMQ_ENCODER_HPP_INCLUDED__ +#if defined(_MSC_VER) +#ifndef NOMINMAX +#define NOMINMAX +#endif +#endif + #include #include #include