]> git.mxchange.org Git - simgear.git/blobdiff - Debug/logstream.hxx
Portability updates by Bernie Bright.
[simgear.git] / Debug / logstream.hxx
index 5c51aa5307e2843bf0c376857f8b21b8f9cba368..5f93b5199d96bd792a55c4b12903434b47c7219e 100644 (file)
 #ifndef _LOGSTREAM_H
 #define _LOGSTREAM_H
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+
 #include "Include/compiler.h"
 
 #ifdef FG_HAVE_STD_INCLUDES
 # include <streambuf>
-# include <ostream>
+# include <iostream>
+//# include <ostream>
 #else
 # include <iostream.h>
 # include "Include/fg_traits.hxx"
 
 #include "debug_types.h"
 
+FG_USING_STD(streambuf);
+FG_USING_STD(ostream);
+FG_USING_STD(cerr);
+FG_USING_STD(endl);
+
 //
 // TODO:
 //
@@ -78,7 +89,7 @@ public:
 
 protected:
 
-    int sync() { return sbuf->sync(); }
+    inline virtual int sync();
     int_type overflow( int ch );
 //     int xsputn( const char* s, istreamsize n );
 
@@ -98,6 +109,16 @@ private:
     void operator= ( const logbuf& );
 };
 
+inline int
+logbuf::sync()
+{
+#ifdef FG_HAVE_STD_INCLUDES
+       return sbuf->pubsync();
+#else
+       return sbuf->sync();
+#endif
+}
+
 inline void
 logbuf::set_log_state( fgDebugClass c, fgDebugPriority p )
 {
@@ -190,6 +211,14 @@ fglog()
 #endif // _LOGSTREAM_H
 
 // $Log$
+// Revision 1.3  1999/01/19 20:53:35  curt
+// Portability updates by Bernie Bright.
+//
+// Revision 1.2  1998/11/07 19:07:02  curt
+// Enable release builds using the --without-logging option to the configure
+// script.  Also a couple log message cleanups, plus some C to C++ comment
+// conversion.
+//
 // Revision 1.1  1998/11/06 21:20:42  curt
 // Initial revision.
 //