]> git.saurik.com Git - apple/libc.git/blob - locale/FreeBSD/collcmp.c.patch
Libc-594.9.5.tar.gz
[apple/libc.git] / locale / FreeBSD / collcmp.c.patch
1 --- collcmp.c.orig 2004-11-25 11:38:16.000000000 -0800
2 +++ collcmp.c 2005-03-30 08:36:37.000000000 -0800
3 @@ -27,19 +27,22 @@
4 #include <sys/cdefs.h>
5 __FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.17 2003/08/03 19:28:23 ache Exp $");
6
7 -#include <string.h>
8 +#include <xlocale.h>
9 +#include <wchar.h>
10 #include "collate.h"
11
12 /*
13 * Compare two characters using collate
14 */
15
16 -int __collate_range_cmp(c1, c2)
17 - int c1, c2;
18 +__private_extern__ int
19 +__collate_range_cmp(c1, c2, loc)
20 + wchar_t c1, c2;
21 + locale_t loc;
22 {
23 - static char s1[2], s2[2];
24 + static wchar_t s1[2], s2[2];
25
26 s1[0] = c1;
27 s2[0] = c2;
28 - return (strcoll(s1, s2));
29 + return (wcscoll_l(s1, s2, loc));
30 }