From bda142a078f9656019e01f9f662de89dc69cb4a8 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Fri, 22 Nov 2002 03:58:55 +0000 Subject: [PATCH] vc7.1 fixes --- dtool/pptempl/compilerSettings.pp | 2 +- dtool/src/dtoolbase/dtoolbase.h | 7 ++++++- dtool/src/dtoolbase/pallocator.T | 8 +++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/dtool/pptempl/compilerSettings.pp b/dtool/pptempl/compilerSettings.pp index 3967a4b1a8..6b8d1350c6 100644 --- a/dtool/pptempl/compilerSettings.pp +++ b/dtool/pptempl/compilerSettings.pp @@ -44,7 +44,7 @@ // ensure pdbs are copied to install dir #define build_pdbs yes -#elif $[eq $[USE_COMPILER], MSVC7] +#elif $[or $[eq $[USE_COMPILER], MSVC7], $[eq $[USE_COMPILER], MSVC7_1]] #define COMPILER cl #define LINKER link diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index c11f79a748..d16a95830d 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -49,8 +49,13 @@ #pragma warning (disable : 4244) #if _MSC_VER >= 1300 + #if _MSC_VER >= 1310 + #define USING_MSVC7_1 +//#pragma message("VC 7.1") + #else +//#pragma message("VC 7.0") + #endif #define USING_MSVC7 -//#pragma message("VC 7.0") #else // #pragma message("VC 6.0") #endif diff --git a/dtool/src/dtoolbase/pallocator.T b/dtool/src/dtoolbase/pallocator.T index 46ecd722af..7f59d0ab09 100644 --- a/dtool/src/dtoolbase/pallocator.T +++ b/dtool/src/dtoolbase/pallocator.T @@ -72,15 +72,17 @@ deallocate(void *p, allocator::size_type) { #elif MODERN_STYLE_ALLOCATOR + + template INLINE pallocator:: pallocator() throw() { } template -INLINE pallocator::pointer pallocator:: -allocate(pallocator::size_type n, allocator::const_pointer) { - return (pallocator::pointer)(*global_operator_new)(n * sizeof(Type)); +INLINE typename pallocator::pointer pallocator:: +allocate(typename pallocator::size_type n, typename allocator::const_pointer) { + return (typename pallocator::pointer)(*global_operator_new)(n * sizeof(Type)); } template