summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-01-26 13:57:02 +0000
committerschwarze <schwarze@openbsd.org>2016-01-26 13:57:02 +0000
commit19fa39c6176021e91f0493c0ce81d52022b1e0f7 (patch)
tree742266e271dd39d9b6a8ead5ac1e8667af0c507c /lib/libc/stdlib/malloc.c
parentImprove the previous fix: call vmxnet3_load_mbuf, bpf_mtap, and flip (diff)
downloadwireguard-openbsd-19fa39c6176021e91f0493c0ce81d52022b1e0f7.tar.xz
wireguard-openbsd-19fa39c6176021e91f0493c0ce81d52022b1e0f7.zip
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 'lib/libc/stdlib/malloc.c')
0 files changed, 0 insertions, 0 deletions