Browse Source

fix UNKNOWN_ALLOCATOR O4

cxgeorge 24 years ago
parent
commit
3d43383564
3 changed files with 11 additions and 3 deletions
  1. 2 2
      dtool/Config.Win32.pp
  2. 5 1
      dtool/LocalSetup.pp
  3. 4 0
      dtool/src/dtoolbase/dtoolbase.h

+ 2 - 2
dtool/Config.Win32.pp

@@ -104,8 +104,8 @@
 // this indicates OLD_STYLE_ALLOCATOR is NOT used (defined as the empty string)
 // this indicates OLD_STYLE_ALLOCATOR is NOT used (defined as the empty string)
 #define OLD_STYLE_ALLOCATOR
 #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)
 // can Intel C++ build this directory successfully (if not, change CC to msvc)
 #define NOT_INTEL_BUILDABLE false
 #define NOT_INTEL_BUILDABLE false

+ 5 - 1
dtool/LocalSetup.pp

@@ -191,7 +191,11 @@ $[cdefine HAVE_RTTI]
 $[cdefine GLOBAL_OPERATOR_NEW_EXCEPTIONS]
 $[cdefine GLOBAL_OPERATOR_NEW_EXCEPTIONS]
 
 
 /* What style STL allocator should we declare? */
 /* 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 OLD_STYLE_ALLOCATOR]
 $[cdefine GNU_STYLE_ALLOCATOR]
 $[cdefine GNU_STYLE_ALLOCATOR]
 
 

+ 4 - 0
dtool/src/dtoolbase/dtoolbase.h

@@ -58,6 +58,10 @@
 
 
 #endif  /* WIN32_VC */
 #endif  /* WIN32_VC */
 
 
+#if defined(USE_UNKNOWN_ALLOCATOR) && !defined(UNKNOWN_ALLOCATOR)
+#define UNKNOWN_ALLOCATOR 1
+#endif
+
 #include "dtoolsymbols.h"
 #include "dtoolsymbols.h"
 
 
 #ifdef HAVE_MALLOC_H
 #ifdef HAVE_MALLOC_H