From c8f16b889f8899dc06452508662c45f99d43fee7 Mon Sep 17 00:00:00 2001 From: Baruch Burstein Date: Mon, 28 Nov 2016 10:20:02 +0200 Subject: define NOMINMAX 1 before every include of windows.h --- src/lib/entropy/cryptoapi_rng/es_capi.cpp | 3 +-- src/lib/entropy/win32_stats/es_win32.cpp | 1 + src/lib/rng/system_rng/system_rng.cpp | 3 +-- src/lib/utils/dyn_load/dyn_load.cpp | 1 + src/lib/utils/mem_ops.cpp | 1 + src/lib/utils/os_utils.cpp | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.cpp b/src/lib/entropy/cryptoapi_rng/es_capi.cpp index a1d809d0d..1624f8946 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.cpp +++ b/src/lib/entropy/cryptoapi_rng/es_capi.cpp @@ -7,10 +7,9 @@ #include #include +#define NOMINMAX 1 #include #include -#undef min -#undef max namespace Botan { diff --git a/src/lib/entropy/win32_stats/es_win32.cpp b/src/lib/entropy/win32_stats/es_win32.cpp index bbc64eaab..520848615 100644 --- a/src/lib/entropy/win32_stats/es_win32.cpp +++ b/src/lib/entropy/win32_stats/es_win32.cpp @@ -6,6 +6,7 @@ */ #include +#define NOMINMAX 1 #include #include diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp index 1ea749327..eaba38241 100644 --- a/src/lib/rng/system_rng/system_rng.cpp +++ b/src/lib/rng/system_rng/system_rng.cpp @@ -10,9 +10,8 @@ #if defined(BOTAN_TARGET_OS_HAS_CRYPTGENRANDOM) #include +#define NOMINMAX 1 #include -#undef min -#undef max #else diff --git a/src/lib/utils/dyn_load/dyn_load.cpp b/src/lib/utils/dyn_load/dyn_load.cpp index df6777e58..1f33dc761 100644 --- a/src/lib/utils/dyn_load/dyn_load.cpp +++ b/src/lib/utils/dyn_load/dyn_load.cpp @@ -12,6 +12,7 @@ #if defined(BOTAN_TARGET_OS_HAS_DLOPEN) #include #elif defined(BOTAN_TARGET_OS_HAS_LOADLIBRARY) + #define NOMINMAX 1 #include #endif diff --git a/src/lib/utils/mem_ops.cpp b/src/lib/utils/mem_ops.cpp index 461b03d6b..a0cd3124f 100644 --- a/src/lib/utils/mem_ops.cpp +++ b/src/lib/utils/mem_ops.cpp @@ -8,6 +8,7 @@ #include #if defined(BOTAN_TARGET_OS_HAS_RTLSECUREZEROMEMORY) + #define NOMINMAX 1 #include #endif diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp index 1e60596ba..d072b2c2b 100644 --- a/src/lib/utils/os_utils.cpp +++ b/src/lib/utils/os_utils.cpp @@ -20,6 +20,7 @@ #endif #if defined(BOTAN_TARGET_OS_IS_WINDOWS) || defined(BOTAN_TARGET_OS_IS_MINGW) + #define NOMINMAX 1 #include #endif -- cgit v1.2.3