diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 1614d05cfd..f21e653695 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -60,6 +60,12 @@ #pragma warning (disable : 4577) #endif /* WIN32_VC */ +/* Windows likes to define min() and max() macros, which will conflict with + std::min() and std::max() respectively, unless we do this: */ +#ifdef WIN32 +#define NOMINMAX +#endif + #ifndef __has_builtin #define __has_builtin(x) 0 #endif @@ -198,10 +204,6 @@ typedef struct _object PyObject; #include #endif -#ifdef PHAVE_MINMAX_H -#include -#endif - #ifdef PHAVE_SYS_TIME_H #include #endif diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 4a369a6f72..1b49826a8f 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2310,7 +2310,6 @@ DTOOL_CONFIG=[ ("PHAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'), ("PHAVE_ALLOCA_H", 'UNDEF', '1'), ("PHAVE_LOCALE_H", 'UNDEF', '1'), - ("PHAVE_MINMAX_H", '1', 'UNDEF'), ("PHAVE_SSTREAM", '1', '1'), ("PHAVE_NEW", '1', '1'), ("PHAVE_SYS_TYPES_H", '1', '1'),