summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-02-08 09:56:16 +0000
committerschwarze <schwarze@openbsd.org>2016-02-08 09:56:16 +0000
commit453c36d1a5b49cb7281e84bed6b8ea672bf7b920 (patch)
tree9189d6dd80d152ca954b3380b009951d2f79be75 /lib/libc
parentsys/param.h -> sys/types.h. No need to drag in nitems() only to (diff)
downloadwireguard-openbsd-453c36d1a5b49cb7281e84bed6b8ea672bf7b920.tar.xz
wireguard-openbsd-453c36d1a5b49cb7281e84bed6b8ea672bf7b920.zip
Align with reality, and with POSIX: For this particular function,
incomplete characters are not an error, do not throw EILSEQ, and are not supposed to. OK millert@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/mbrtowc.310
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libc/locale/mbrtowc.3 b/lib/libc/locale/mbrtowc.3
index f19621ba571..f4af36c5817 100644
--- a/lib/libc/locale/mbrtowc.3
+++ b/lib/libc/locale/mbrtowc.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbrtowc.3,v 1.4 2013/06/05 03:39:22 tedu Exp $
+.\" $OpenBSD: mbrtowc.3,v 1.5 2016/02/08 09:56:16 schwarze Exp $
.\" $NetBSD: mbrtowc.3,v 1.5 2003/09/08 17:54:31 wiz Exp $
.\"
.\" Copyright (c)2002 Citrus Project,
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: February 8 2016 $
.Dt MBRTOWC 3
.Os
.Sh NAME
@@ -210,10 +210,6 @@ truncated input.
points to an incomplete byte sequence of length
.Fa n
which has been consumed and contains part of a valid multibyte character.
-.Fn mbrtowc
-sets
-.Va errno
-to EILSEQ.
The character may be completed by calling
.Fn mbrtowc
again with
@@ -230,7 +226,7 @@ function may cause an error in the following cases:
.Bl -tag -width Er
.It Bq Er EILSEQ
.Fa s
-points to an invalid or incomplete multibyte character.
+points to an invalid multibyte character.
.It Bq Er EINVAL
.Fa mbs
points to an invalid or uninitialized mbstate_t object.