diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-26 13:57:03 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-26 13:57:03 +0000 |
commit | 2ad7153b610cde8aab71ed6e895212ab6913488f (patch) | |
tree | cb6f0b6b204eb0ed422e2e220d9d009b1e186f10 /sys/dev/pv/xen.c | |
parent | 0c91ece94fd469546f55b36ee67aa264c7387f0a (diff) |
When encoding fails in fputwc(3), set the error indicator as required
by POSIX and as FreeBSD, SunOS 10/11, and glibc also do it. Note
that an enquiry to the Austin Group led to the conclusion that this
change probably violates the C standard: C and POSIX unintentionally
conflict. But the POSIX behaviour makes more sense (easier to write
correct error handling code for it, and a lower risk that programs
miss errors) and is much more widespread, and the Austin Group
intends to approach the C committee in order to adjust the C standard.
See: http://austingroupbugs.net/view.php?id=1022
While here, do not set errno a second time, wcrtomb(3) already did that,
and it is required to do it by the standard.
OK millert@ and tedu@, and jca@ no longer objects
Diffstat (limited to 'sys/dev/pv/xen.c')
0 files changed, 0 insertions, 0 deletions