Commit 5e85fa99 by Benjamin Kosnik Committed by Paolo Carlini

streambuf.tcc (__copy_streambufs): Revert previous fix for the interactive half…

streambuf.tcc (__copy_streambufs): Revert previous fix for the interactive half of libstdc++/6745...

2002-11-20  Benjamin Kosnik  <bkoz@redhat.com>
	    Jonathan Lennox  <lennox@cs.columbia.edu>

	* include/bits/streambuf.tcc (__copy_streambufs):
	Revert previous fix for the interactive half of
	libstdc++/6745, use _M_buf_size_opt to set dynamically
	the correct buffer size.

Co-Authored-By: Jonathan Lennox <lennox@cs.columbia.edu>

From-SVN: r59314
parent c6de9c29
2002-11-20 Benjamin Kosnik <bkoz@redhat.com>
Jonathan Lennox <lennox@cs.columbia.edu>
* include/bits/streambuf.tcc (__copy_streambufs):
Revert previous fix for the interactive half of
libstdc++/6745, use _M_buf_size_opt to set dynamically
the correct buffer size.
2002-11-20 Jonathan Wakely <redi@gcc.gnu.org>
* docs/html/21_strings/howto.html: Fix example code, cite Gaby's
......
......@@ -37,10 +37,6 @@
#pragma GCC system_header
#ifdef _GLIBCPP_HAVE_UNISTD_H
#include <unistd.h>
#endif
namespace std
{
template<typename _CharT, typename _Traits>
......@@ -224,11 +220,8 @@ namespace std
}
else
{
#ifdef _GLIBCPP_HAVE_ISATTY
size_t __size = isatty(0) ? 1 : static_cast<size_t>(BUFSIZ);
#else
size_t __size = 1;
#endif
size_t __size =
__sbin->_M_buf_size_opt > 0 ? __sbin->_M_buf_size_opt : 1;
_CharT* __buf =
static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __size));
streamsize __charsread = __sbin->sgetn(__buf, __size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment