Browse Source

Fix stdin/stdout initialization of buffering type. I had changed the
default static initiailization and forgotten to update _stdio_init().

Manuel Novoa III 23 years ago
parent
commit
347b1fc3b6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libc/stdio/stdio.c

+ 2 - 2
libc/stdio/stdio.c

@@ -1773,8 +1773,8 @@ void _stdio_init(void)
 {
 {
 #ifdef __STDIO_BUFFERS
 #ifdef __STDIO_BUFFERS
 	/* stdin and stdout uses line buffering when connected to a tty. */
 	/* stdin and stdout uses line buffering when connected to a tty. */
-	_stdio_streams[0].modeflags ^= isatty(0) * __FLAG_LBF;
+	_stdio_streams[0].modeflags &= isatty(0) * __FLAG_LBF;
-	_stdio_streams[1].modeflags ^= isatty(1) * __FLAG_LBF;
+	_stdio_streams[1].modeflags &= isatty(1) * __FLAG_LBF;
 #endif /* __STDIO_BUFFERS */
 #endif /* __STDIO_BUFFERS */
 #ifndef __UCLIBC__
 #ifndef __UCLIBC__
 /* __stdio_term is automatically when exiting if stdio is used.
 /* __stdio_term is automatically when exiting if stdio is used.