libc/locale: Fix type breakage in __collate_range_cmp().
commit0366f1b52787fc04c4e16927e2a5d2d9b9920673
authorpfg <pfg@FreeBSD.org>
Sun, 5 Jun 2016 19:12:52 +0000 (5 19:12 +0000)
committerpfg <pfg@FreeBSD.org>
Sun, 5 Jun 2016 19:12:52 +0000 (5 19:12 +0000)
tree10d3a6e472257f64e9b5efe360f166cb3ee1940c
parent4d8712daf1610ccab464077fdc055a48a4b845ed
libc/locale: Fix type breakage in __collate_range_cmp().

When collation support was brought in, the second and third
arguments in __collate_range_cmp() were changed from int to
wchar_t, breaking the ABI. Change them to a "char" type which
makes more sense and keeps the ABI compatible.

Also introduce __wcollate_range_cmp() which does work with wide
characters. This function is used only internally in libc so
we don't export it. Use the new function in glob(3), fnmatch(3),
and regexec(3).

PR: 179721
Suggested by: ache. jilles
MFC after: 3 weeks (perhaps partial only)
lib/libc/gen/fnmatch.c
lib/libc/gen/glob.c
lib/libc/locale/collate.h
lib/libc/locale/collcmp.c
lib/libc/regex/regcomp.c