CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2016/01/26 06:57:02

Modified files:
        lib/libc/stdio : fputwc.c 

Log message:
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

Reply via email to