aboutsummaryrefslogtreecommitdiff
path: root/system/include/libcxx/__std_stream
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-08 15:56:02 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-08 15:56:02 -0800
commite0268fa1035a718341c53921eee9318d4a8033cd (patch)
tree2b3eeb07928f9521498332002444dbfa44f34dfb /system/include/libcxx/__std_stream
parenta11272805c16be75f5e6d00c8214afcac7ba9d05 (diff)
parentad1da1e6685d4483e096d7e0bbd8e38e686bd322 (diff)
Merge pull request #1767 from waywardmonkeys/update-libcxx1.7.2
Update libcxx
Diffstat (limited to 'system/include/libcxx/__std_stream')
-rw-r--r--system/include/libcxx/__std_stream14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/include/libcxx/__std_stream b/system/include/libcxx/__std_stream
index cff43317..5403adab 100644
--- a/system/include/libcxx/__std_stream
+++ b/system/include/libcxx/__std_stream
@@ -233,6 +233,7 @@ public:
protected:
virtual int_type overflow (int_type __c = traits_type::eof());
+ virtual streamsize xsputn(const char_type* __s, streamsize __n);
virtual int sync();
virtual void imbue(const locale& __loc);
@@ -309,6 +310,19 @@ __stdoutbuf<_CharT>::overflow(int_type __c)
}
template <class _CharT>
+streamsize
+__stdoutbuf<_CharT>::xsputn(const char_type* __s, streamsize __n)
+{
+ if (__always_noconv_)
+ return fwrite(__s, sizeof(char_type), __n, __file_);
+ streamsize __i = 0;
+ for (; __i < __n; ++__i, ++__s)
+ if (overflow(traits_type::to_int_type(*__s)) == traits_type::eof())
+ break;
+ return __i;
+}
+
+template <class _CharT>
int
__stdoutbuf<_CharT>::sync()
{