1 --- strcoll.c.orig 2003-05-20 15:23:54.000000000 -0700
2 +++ strcoll.c 2005-02-17 10:37:14.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/string/strcoll.c,v 1.13 2001/11/07 19:55:16 obrien Exp $");
7 +#include "xlocale_private.h"
15 +strcoll_l(s, s2, loc)
19 int len, len2, prim, prim2, sec, sec2, ret, ret2;
23 - if (__collate_load_error)
24 + NORMALIZE_LOCALE(loc);
25 + if (loc->__collate_load_error)
30 - if (__collate_substitute_nontrivial) {
31 - t = tt = __collate_substitute(s);
32 - t2 = tt2 = __collate_substitute(s2);
33 + if (loc->__collate_substitute_nontrivial) {
34 + t = tt = (char *)__collate_substitute_l((unsigned char *)s, loc);
35 + t2 = tt2 = (char *)__collate_substitute_l((unsigned char *)s2, loc);
43 - __collate_lookup(t, &len, &prim, &sec);
44 + __collate_lookup_l((unsigned char *)t, &len, &prim, &sec, loc);
47 while(*t2 && !prim2) {
48 - __collate_lookup(t2, &len2, &prim2, &sec2);
49 + __collate_lookup_l((unsigned char *)t2, &len2, &prim2, &sec2, loc);
57 - ret = -(int)((u_char)*t2);
58 + ret = -(int)((unsigned char)*t2);
61 + ret = (unsigned char)*t;
74 + return strcoll_l(s, s2, __current_locale());