summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-03-14 00:00:24 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-03-14 00:00:24 +0000
commitf654c6f7b85f15fd43fe16575f1bf1724f680ebc (patch)
treeb407a40c5d874838a90ff383f2f1075def3aef78 /libc
parent9121e41f4629b82bf628456b10ab211f5c1e33aa (diff)
I vow to rerun _all_ the tests before making commits. :-(
I successfully managed to blow away all the modeflags for the file _except_ the one dealing with buffering...
Diffstat (limited to 'libc')
-rw-r--r--libc/stdio/stdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 1d89bb922..5a2800a05 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -1773,8 +1773,8 @@ void _stdio_init(void)
{
#ifdef __STDIO_BUFFERS
/* stdin and stdout uses line buffering when connected to a tty. */
- _stdio_streams[0].modeflags &= isatty(0) * __FLAG_LBF;
- _stdio_streams[1].modeflags &= isatty(1) * __FLAG_LBF;
+ _stdio_streams[0].modeflags ^= (1-isatty(0)) * __FLAG_LBF;
+ _stdio_streams[1].modeflags ^= (1-isatty(1)) * __FLAG_LBF;
#endif /* __STDIO_BUFFERS */
#ifndef __UCLIBC__
/* __stdio_term is automatically when exiting if stdio is used.