]> git.saurik.com Git - apple/libc.git/blame - locale/FreeBSD/collcmp.c.patch
Libc-763.13.tar.gz
[apple/libc.git] / locale / FreeBSD / collcmp.c.patch
CommitLineData
1f2f436a
A
1--- collcmp.c.bsdnew 2009-11-09 15:05:25.000000000 -0800
2+++ collcmp.c 2009-11-09 15:23:31.000000000 -0800
3@@ -27,18 +27,20 @@
3d9156a7 4 #include <sys/cdefs.h>
1f2f436a 5 __FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.18 2005/02/27 14:54:23 phantom Exp $");
3d9156a7 6
224c7076 7-#include <string.h>
3d9156a7 8+#include <xlocale.h>
224c7076 9+#include <wchar.h>
3d9156a7
A
10 #include "collate.h"
11
224c7076 12 /*
3d9156a7
A
13 * Compare two characters using collate
14 */
15
1f2f436a 16-int __collate_range_cmp(int c1, int c2)
224c7076 17+__private_extern__ int
1f2f436a 18+__collate_range_cmp(wchar_t c1, wchar_t c2, locale_t loc)
3d9156a7 19 {
224c7076
A
20- static char s1[2], s2[2];
21+ static wchar_t s1[2], s2[2];
3d9156a7
A
22
23 s1[0] = c1;
24 s2[0] = c2;
25- return (strcoll(s1, s2));
224c7076 26+ return (wcscoll_l(s1, s2, loc));
3d9156a7 27 }