setbuf.3: POSIX doesn't require to errno to be unchanged after successful setbuf()

See https://www.austingroupbugs.net/view.php?id=397#c799

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2021-02-06 10:26:43 +01:00
parent c7c869e66d
commit bdd65639ba
1 changed files with 15 additions and 0 deletions

View File

@ -188,6 +188,21 @@ The
and
.BR setvbuf ()
functions conform to C89 and C99.
.SH NOTES
POSIX notes
.\" https://www.austingroupbugs.net/view.php?id=397#c799
.\" 0000397: setbuf and errno
that the value of
.I errno
is unspecified after a call to
.BR setbuf ()
and further notes that, since the value of
.I errno
is not required to be unchanged after a successful call to
.BR setbuf (),
applications should instead use
.BR setvbuf ()
in order to detect errors.
.SH BUGS
.\" The
.\" .BR setbuffer ()