瀏覽代碼

make TYPENAME switchable

David Rose 23 年之前
父節點
當前提交
8624205412
共有 5 個文件被更改,包括 16 次插入0 次删除
  1. 3 0
      dtool/Config.Irix.pp
  2. 3 0
      dtool/Config.Linux.pp
  3. 3 0
      dtool/Config.Win32.pp
  4. 3 0
      dtool/LocalSetup.pp
  5. 4 0
      dtool/src/dtoolbase/dtoolbase_cc.h

+ 3 - 0
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

+ 3 - 0
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

+ 3 - 0
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

+ 3 - 0
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]

+ 4 - 0
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)