From 862420541219092070da8dfda152d653b6fea05c Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 25 Nov 2002 21:49:04 +0000 Subject: [PATCH] make TYPENAME switchable --- dtool/Config.Irix.pp | 3 +++ dtool/Config.Linux.pp | 3 +++ dtool/Config.Win32.pp | 3 +++ dtool/LocalSetup.pp | 3 +++ dtool/src/dtoolbase/dtoolbase_cc.h | 4 ++++ 5 files changed, 16 insertions(+) diff --git a/dtool/Config.Irix.pp b/dtool/Config.Irix.pp index bf167dfc87..86d556e4b8 100644 --- a/dtool/Config.Irix.pp +++ b/dtool/Config.Irix.pp @@ -20,6 +20,9 @@ // Does the C++ compiler support ios::binary? #define HAVE_IOS_BINARY +// How about the typename keyword? +#define HAVE_TYPENAME 1 + // Will the compiler avoid inserting extra bytes in structs between a // base struct and its derived structs? It is safe to define this // false if you don't know, but if you know that you can get away with diff --git a/dtool/Config.Linux.pp b/dtool/Config.Linux.pp index 56df1237e2..80823fc1aa 100644 --- a/dtool/Config.Linux.pp +++ b/dtool/Config.Linux.pp @@ -20,6 +20,9 @@ // Does the C++ compiler support ios::binary? #define HAVE_IOS_BINARY 1 +// How about the typename keyword? +#define HAVE_TYPENAME 1 + // Will the compiler avoid inserting extra bytes in structs between a // base struct and its derived structs? It is safe to define this // false if you don't know, but if you know that you can get away with diff --git a/dtool/Config.Win32.pp b/dtool/Config.Win32.pp index 8b2bc1e05e..536ba5a598 100644 --- a/dtool/Config.Win32.pp +++ b/dtool/Config.Win32.pp @@ -20,6 +20,9 @@ // Does the C++ compiler support ios::binary? #define HAVE_IOS_BINARY 1 +// How about the typename keyword? +#define HAVE_TYPENAME 1 + // Will the compiler avoid inserting extra bytes in structs between a // base struct and its derived structs? It is safe to define this // false if you don't know, but if you know that you can get away with diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index b8babccf29..9f997cebfc 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -137,6 +137,9 @@ $[cdefine HAVE_NAMESPACE] /* Define if the C++ iostream library supports ios::binary. */ $[cdefine HAVE_IOS_BINARY] +/* Define if the C++ compiler supports the typename keyword. */ +$[cdefine HAVE_TYPENAME] + /* Define if we can trust the compiler not to insert extra bytes in structs between base structs and derived structs. */ $[cdefine SIMPLE_STRUCT_POINTERS] diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 7b9d1f1b39..8dc355f5ea 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -68,7 +68,11 @@ using namespace std; using namespace std; #endif +#ifdef HAVE_TYPENAME #define TYPENAME typename +#else +#define TYPENAME +#endif #if defined(WIN32_VC) && defined(FORCE_INLINING)