From a86868526e163812eb286ea71fe9600df7deea4a Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 6 Mar 2001 21:14:32 +0000 Subject: [PATCH] Patch to tweak traits so they work on Irix too. --- simgear/compiler.h | 1 + simgear/debug/logstream.hxx | 11 +++++++++-- simgear/misc/zfstream.hxx | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/simgear/compiler.h b/simgear/compiler.h index e50a5c43..27665fc1 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -238,6 +238,7 @@ # define FG_NAMESPACES # define FG_HAVE_STD # define FG_CLASS_PARTIAL_SPECIALIZATION +# define FG_HAVE_TRAITS # define STL_ALGORITHM # define STL_FUNCTIONAL diff --git a/simgear/debug/logstream.hxx b/simgear/debug/logstream.hxx index 669ce045..493138ed 100644 --- a/simgear/debug/logstream.hxx +++ b/simgear/debug/logstream.hxx @@ -31,6 +31,11 @@ #include +// At least Irix needs this +#ifdef FG_HAVE_NATIVE_SGI_COMPILERS +#include +#endif + #ifdef FG_HAVE_STD_INCLUDES # include # include @@ -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 traits_type; typedef char_traits::int_type int_type; - typedef char_traits::pos_type pos_type; - typedef char_traits::off_type off_type; + // typedef char_traits::pos_type pos_type; + // typedef char_traits::off_type off_type; #endif // logbuf( streambuf* sb ) : sbuf(sb) {} logbuf(); diff --git a/simgear/misc/zfstream.hxx b/simgear/misc/zfstream.hxx index 945e8548..058c1a1f 100644 --- a/simgear/misc/zfstream.hxx +++ b/simgear/misc/zfstream.hxx @@ -101,8 +101,8 @@ public: #ifndef FG_HAVE_STD_INCLUDES typedef char_traits traits_type; typedef char_traits::int_type int_type; - typedef char_traits::pos_type pos_type; - typedef char_traits::off_type off_type; + // typedef char_traits::pos_type pos_type; + // typedef char_traits::off_type off_type; #endif gzfilebuf(); -- 2.39.5