From 9a8644033df7a641393a4842f6855726ca649723 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 6 Apr 2016 15:22:11 -0500 Subject: [PATCH] Prevent redefinition of NOMINMAX While this protection is not strictly necessary here, if someone does a cut-and-paste into a header file it should be included. --- pvtoolsSrc/eget.cpp | 2 +- src/remote/codec.cpp | 3 ++- src/server/beaconEmitter.cpp | 2 +- testApp/remote/testCodec.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pvtoolsSrc/eget.cpp b/pvtoolsSrc/eget.cpp index b43fdc5..00508c6 100644 --- a/pvtoolsSrc/eget.cpp +++ b/pvtoolsSrc/eget.cpp @@ -1,4 +1,4 @@ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif diff --git a/src/remote/codec.cpp b/src/remote/codec.cpp index fb58723..15f6c2e 100644 --- a/src/remote/codec.cpp +++ b/src/remote/codec.cpp @@ -3,7 +3,8 @@ * pvAccessCPP is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ -#ifdef _WIN32 + +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif diff --git a/src/server/beaconEmitter.cpp b/src/server/beaconEmitter.cpp index 4b33299..bdce554 100644 --- a/src/server/beaconEmitter.cpp +++ b/src/server/beaconEmitter.cpp @@ -4,7 +4,7 @@ * in file LICENSE that is included with this distribution. */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif diff --git a/testApp/remote/testCodec.cpp b/testApp/remote/testCodec.cpp index 89a9fb0..73fbabb 100644 --- a/testApp/remote/testCodec.cpp +++ b/testApp/remote/testCodec.cpp @@ -2,7 +2,7 @@ * testCodec.cpp */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(NOMINMAX) #define NOMINMAX #endif