HomeFreeBSD

libc: locale: fix EUC shift check

Description

libc: locale: fix EUC shift check

wchar_t is unsigned on ARM platforms, and signed pretty much everywhere
else. On signed platforms, nm ends up with bogus upper bits set if we
did in-fact have a valid CS2 or CS3 (MSB set). Mask just the low byte
to avoid sign bit garbage.

Bare basic test of converting a CS2 widechar in eucCN, which would
previously kick back an EILSEQ.

Reviewed by: bapt, rew
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D43262

Details

Provenance
kevansAuthored on Sun, Apr 20, 6:29 PM
Reviewer
bapt
Differential Revision
D43262: libc: locale: fix EUC shift check
Parents
rG40ad87e958e8: usb: if_ure: stop touching the mbuf accounting on rxq insertion
Branches
Unknown
Tags
Unknown