summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fnmatch.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-06-05 19:12:52 +0000
committerpfg <pfg@FreeBSD.org>2016-06-05 19:12:52 +0000
commit0366f1b52787fc04c4e16927e2a5d2d9b9920673 (patch)
tree10d3a6e472257f64e9b5efe360f166cb3ee1940c /lib/libc/gen/fnmatch.c
parent4d8712daf1610ccab464077fdc055a48a4b845ed (diff)
downloadFreeBSD-src-0366f1b52787fc04c4e16927e2a5d2d9b9920673.zip
FreeBSD-src-0366f1b52787fc04c4e16927e2a5d2d9b9920673.tar.gz
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)
Diffstat (limited to 'lib/libc/gen/fnmatch.c')
-rw-r--r--lib/libc/gen/fnmatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c
index 2f240a8..8cdcaf1 100644
--- a/lib/libc/gen/fnmatch.c
+++ b/lib/libc/gen/fnmatch.c
@@ -296,8 +296,8 @@ rangematch(const char *pattern, wchar_t test, int flags, char **newp,
if (table->__collate_load_error ?
c <= test && test <= c2 :
- __collate_range_cmp(table, c, test) <= 0
- && __collate_range_cmp(table, test, c2) <= 0
+ __wcollate_range_cmp(table, c, test) <= 0
+ && __wcollate_range_cmp(table, test, c2) <= 0
)
ok = 1;
} else if (c == test)
OpenPOWER on IntegriCloud