From 8dcb587e449c5a17bc74348cd1967745dbca365c Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 1 Oct 2016 13:40:09 +0200 Subject: [PATCH] Define NOMINMAX macro to prevent definition min and max macros in stdlib header files --- include/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/common.h b/include/common.h index e0108f33d..be8ae69ce 100644 --- a/include/common.h +++ b/include/common.h @@ -54,11 +54,15 @@ #define CEIL(a) ((a - (int) (a)) > 0 ? a + 1 : a) +#define NOMINMAX 1 + #if defined (__APPLE__) #define __stdcall #endif -#if defined (_WIN32) || defined (__WIN32__) || defined (__CYGWIN__) +#if defined (__MSC_VER) +#define HC_API_CALL __cdecl +#elif defined (_WIN32) || defined (__WIN32__) || defined (__CYGWIN__) #define HC_API_CALL __stdcall #else #define HC_API_CALL