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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59314
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
#pragma GCC system_header
-#ifdef _GLIBCPP_HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
namespace std
{
template<typename _CharT, typename _Traits>
}
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);