OSDN Git Service

Fix the read/write auto-transition bugs. Note that if we can't
authorManuel Novoa III <mjn3@codepoet.org>
Tue, 9 Apr 2002 17:05:32 +0000 (17:05 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Tue, 9 Apr 2002 17:05:32 +0000 (17:05 -0000)
commitb00a85c837152d486328282bb94066e835a200a7
treeb2e095b3c5e536c0522b59903d984f54e0b29c14
parent6fe5b769d6e013febf722788cb890c3af9701a02
Fix the read/write auto-transition bugs.  Note that if we can't
auto-transition, we fail the operation.  This is different than glibc's
apparent behavior for writing of clearing the read buffer and still
failing the write without setting the stream's error flag.

Also, change a number of "errno = xxx" assignments to use __set_errno().

Also, change setvbuf(file, NULL, _IO{LF}BF, 0) behavior to more closely
match glibc's by keeping the current buffer and only changing the buffering
mode.  Update setlinebuf() in the process to match the man page behavior.
libc/stdio/stdio.c