If handed a bad file pointer that we can't write to, set the errno value
authorHiten Pandya <hmp@dragonflybsd.org>
Tue, 8 Jun 2004 04:04:11 +0000 (04:04 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Tue, 8 Jun 2004 04:04:11 +0000 (04:04 +0000)
commitd53a5b6c559c0e5864d40dbca5317ac5bb8ce93f
treecb992c1d9fb9c827f376323046cd740480a6fbbf
parentd6048b93d593138f02ffad813985e74d1ae75fd6
If handed a bad file pointer that we can't write to, set the errno value
to EBADF in order to get SUSv2 conformant behavior in higher level calls
like fputs() and puts().

Obtained-from:  FreeBSD (HEAD)
lib/libc/stdio/fvwrite.c