]> git.mxchange.org Git - simgear.git/commitdiff
Patch to tweak traits so they work on Irix too.
authorcurt <curt>
Tue, 6 Mar 2001 21:14:32 +0000 (21:14 +0000)
committercurt <curt>
Tue, 6 Mar 2001 21:14:32 +0000 (21:14 +0000)
simgear/compiler.h
simgear/debug/logstream.hxx
simgear/misc/zfstream.hxx

index e50a5c43121faffd82003aa84fc9d7bff2a4d03f..27665fc18d016abbc12b0f2fe3a71c7682f574ee 100644 (file)
 #  define FG_NAMESPACES
 #  define FG_HAVE_STD
 #  define FG_CLASS_PARTIAL_SPECIALIZATION
+#  define FG_HAVE_TRAITS
 
 #  define STL_ALGORITHM  <algorithm>
 #  define STL_FUNCTIONAL <functional>
index 669ce0456e22fec5f3bae0eca67c8618f45c3ccf..493138ed6a5186339cc3ee6287093bbd81e5d156 100644 (file)
 
 #include <simgear/compiler.h>
 
+// At least Irix needs this
+#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
+#include <char_traits.h>
+#endif
+
 #ifdef FG_HAVE_STD_INCLUDES
 # include <streambuf>
 # include <iostream>
@@ -46,6 +51,8 @@ FG_USING_STD(streambuf);
 FG_USING_STD(ostream);
 FG_USING_STD(cerr);
 FG_USING_STD(endl);
+#else
+FG_USING_STD(char_traits);
 #endif
 
 #ifdef __MWERKS__
@@ -73,8 +80,8 @@ public:
 #ifndef FG_HAVE_STD_INCLUDES
     typedef char_traits<char>           traits_type;
     typedef char_traits<char>::int_type int_type;
-    typedef char_traits<char>::pos_type pos_type;
-    typedef char_traits<char>::off_type off_type;
+    // typedef char_traits<char>::pos_type pos_type;
+    // typedef char_traits<char>::off_type off_type;
 #endif
 //     logbuf( streambuf* sb ) : sbuf(sb) {}
     logbuf();
index 945e85482ff19ec6edf19e30616de75a2c89f5af..058c1a1fff439b912e5dcf31f4b147db996cc914 100644 (file)
@@ -101,8 +101,8 @@ public:
 #ifndef FG_HAVE_STD_INCLUDES
     typedef char_traits<char>           traits_type;
     typedef char_traits<char>::int_type int_type;
-    typedef char_traits<char>::pos_type pos_type;
-    typedef char_traits<char>::off_type off_type;
+    // typedef char_traits<char>::pos_type pos_type;
+    // typedef char_traits<char>::off_type off_type;
 #endif
 
     gzfilebuf();