Browse Source

compile maya5.0 on linux

David Rose 22 years ago
parent
commit
a4d32f8d14
1 changed files with 8 additions and 9 deletions
  1. 8 9
      pandatool/src/maya/pre_maya_include.h

+ 8 - 9
pandatool/src/maya/pre_maya_include.h

@@ -32,19 +32,18 @@
 // built-in Maya stream operators, and we have to protect ourselves
 // built-in Maya stream operators, and we have to protect ourselves
 // from them.
 // from them.
 
 
-// In windows, the antiquated headers define completely unrelated (and
-// incompatible) classes from those declared in the new headers.  On
-// the other hand, in gcc the antiquated headers seem to be references
-// to the new template classes, so under gcc we also have to declare
-// typedefs to make this work.
+// In Maya 5.0, the headers seem to provide the manifest
+// REQUIRE_IOSTREAM, which forces it to use the new <iostream> headers
+// instead of the old <iostream.h> headers.  It also says this is for
+// Linux only.
 #ifdef __GNUC__
 #ifdef __GNUC__
 #ifndef PRE_MAYA_INCLUDE_H
 #ifndef PRE_MAYA_INCLUDE_H
 #define PRE_MAYA_INCLUDE_H
 #define PRE_MAYA_INCLUDE_H
-#include <iostream.h>
-typedef ostream maya_ostream;
-typedef istream maya_istream;
+#define REQUIRE_IOSTREAM
 #endif
 #endif
-#endif  // __GNUC__
+#else  // __GNUC__
 
 
 #define ostream maya_ostream
 #define ostream maya_ostream
 #define istream maya_istream
 #define istream maya_istream
+
+#endif  // __GNUC__