1 --- makebuf.c.orig 2006-10-11 20:54:06.000000000 -0700
2 +++ makebuf.c 2006-10-12 10:09:09.000000000 -0700
5 #include "un-namespace.h"
7 +#define TTYBUFSIZE 4096
10 * Allocate a file buffer, or switch to unbuffered I/O.
11 * Per the ANSI C standard, ALL tty devices default to line buffered.
15 flags = __swhatbuf(fp, &size, &couldbetty);
16 + if (couldbetty && isatty(fp->_file)) {
18 + /* st_blksize for ttys is 128K, so make it more reasonable */
19 + if (size > TTYBUFSIZE)
20 + fp->_blksize = size = TTYBUFSIZE;
22 if ((p = malloc(size)) == NULL) {
24 fp->_bf._base = fp->_p = fp->_nbuf;
27 fp->_bf._base = fp->_p = p;
29 - if (couldbetty && isatty(fp->_file))