This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Jonathan Lennox wrote:
Paolo Carlini writes:Hummm...
+#ifdef _GLIBCPP_HAVE_ISATTY + size_t __size = isatty(0) ? 1 : static_cast<size_t>(BUFSIZ);
+#else
+ size_t __size = 1;
+#endif
One problem with this. __copy_streambufs is a general function -- it's not just used to copy from stdin. However, this patch conditionalizes the function's buffer size on isatty(0), even though in many cases when it's used, (i.e., copying from a readable buffer other than cin->rdbuf()), the nature of stdin is irrelevant.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |