aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paludis/util/tee_output_stream.cc9
-rw-r--r--paludis/util/tee_output_stream.hh2
2 files changed, 11 insertions, 0 deletions
diff --git a/paludis/util/tee_output_stream.cc b/paludis/util/tee_output_stream.cc
index 32899685b..d179318f8 100644
--- a/paludis/util/tee_output_stream.cc
+++ b/paludis/util/tee_output_stream.cc
@@ -50,6 +50,15 @@ TeeOutputStreamBuf::overflow(int_type c)
return c;
}
+int
+TeeOutputStreamBuf::sync()
+{
+ for (std::list<std::ostream *>::iterator i(_imp->streams.begin()), i_end(_imp->streams.end()) ;
+ i != i_end ; ++i)
+ **i << std::flush;
+ return 0;
+}
+
std::streamsize
TeeOutputStreamBuf::xsputn(const char * s, std::streamsize num)
{
diff --git a/paludis/util/tee_output_stream.hh b/paludis/util/tee_output_stream.hh
index c464e97b9..cf01beed6 100644
--- a/paludis/util/tee_output_stream.hh
+++ b/paludis/util/tee_output_stream.hh
@@ -35,6 +35,8 @@ namespace paludis
virtual int_type
overflow(int_type c);
+ virtual int sync();
+
virtual std::streamsize
xsputn(const char * s, std::streamsize num);