Browse Source

make TYPENAME switchable

David Rose 23 years ago
parent
commit
8624205412

+ 3 - 0
dtool/Config.Irix.pp

@@ -20,6 +20,9 @@
 // Does the C++ compiler support ios::binary?
 // Does the C++ compiler support ios::binary?
 #define HAVE_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
 // Will the compiler avoid inserting extra bytes in structs between a
 // base struct and its derived structs?  It is safe to define this
 // 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
 // false if you don't know, but if you know that you can get away with

+ 3 - 0
dtool/Config.Linux.pp

@@ -20,6 +20,9 @@
 // Does the C++ compiler support ios::binary?
 // Does the C++ compiler support ios::binary?
 #define HAVE_IOS_BINARY 1
 #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
 // Will the compiler avoid inserting extra bytes in structs between a
 // base struct and its derived structs?  It is safe to define this
 // 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
 // false if you don't know, but if you know that you can get away with

+ 3 - 0
dtool/Config.Win32.pp

@@ -20,6 +20,9 @@
 // Does the C++ compiler support ios::binary?
 // Does the C++ compiler support ios::binary?
 #define HAVE_IOS_BINARY 1
 #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
 // Will the compiler avoid inserting extra bytes in structs between a
 // base struct and its derived structs?  It is safe to define this
 // 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
 // false if you don't know, but if you know that you can get away with

+ 3 - 0
dtool/LocalSetup.pp

@@ -137,6 +137,9 @@ $[cdefine HAVE_NAMESPACE]
 /* Define if the C++ iostream library supports ios::binary.  */
 /* Define if the C++ iostream library supports ios::binary.  */
 $[cdefine HAVE_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
 /* Define if we can trust the compiler not to insert extra bytes in
    structs between base structs and derived structs. */
    structs between base structs and derived structs. */
 $[cdefine SIMPLE_STRUCT_POINTERS]
 $[cdefine SIMPLE_STRUCT_POINTERS]

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

@@ -68,7 +68,11 @@ using namespace std;
 using namespace std;
 using namespace std;
 #endif
 #endif
 
 
+#ifdef HAVE_TYPENAME
 #define TYPENAME typename
 #define TYPENAME typename
+#else
+#define TYPENAME
+#endif
 
 
 
 
 #if defined(WIN32_VC) && defined(FORCE_INLINING)
 #if defined(WIN32_VC) && defined(FORCE_INLINING)