diff --git a/dtool/Config.Win32.pp b/dtool/Config.Win32.pp index fc3b555e49..4661691d75 100644 --- a/dtool/Config.Win32.pp +++ b/dtool/Config.Win32.pp @@ -104,8 +104,8 @@ // this indicates OLD_STYLE_ALLOCATOR is NOT used (defined as the empty string) #define OLD_STYLE_ALLOCATOR -// this is reqd for msvc 7.0 to build (beta-only, havent tested final) -// #define UNKNOWN_ALLOCATOR 1 +// this is reqd for msvc 7.0 to build (beta-only, havent tested final). Default on for Opt4, off otherwise +//#define USE_UNKNOWN_ALLOCATOR 1 // can Intel C++ build this directory successfully (if not, change CC to msvc) #define NOT_INTEL_BUILDABLE false diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 385143bc04..cae46222c1 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -191,7 +191,11 @@ $[cdefine HAVE_RTTI] $[cdefine GLOBAL_OPERATOR_NEW_EXCEPTIONS] /* What style STL allocator should we declare? */ -$[cdefine UNKNOWN_ALLOCATOR] + +// Use this to force UNKNOWN_ALLOCATOR for non-Opt4 (it is already default for Opt4 using /DUNKNOWN_ALLOCATOR) +// see dtoolbase.h +$[cdefine USE_UNKNOWN_ALLOCATOR] + $[cdefine OLD_STYLE_ALLOCATOR] $[cdefine GNU_STYLE_ALLOCATOR] diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 00bffa6895..a27b4cc8a5 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -58,6 +58,10 @@ #endif /* WIN32_VC */ +#if defined(USE_UNKNOWN_ALLOCATOR) && !defined(UNKNOWN_ALLOCATOR) +#define UNKNOWN_ALLOCATOR 1 +#endif + #include "dtoolsymbols.h" #ifdef HAVE_MALLOC_H