View | Details | Raw Unified | Return to bug 179721 | Differences between
and this patch

Collapse All | Expand All

(-)lib/libc/gen/fnmatch.c (-2 / +2 lines)
Lines 296-303 Link Here
296
296
297
			if (table->__collate_load_error ?
297
			if (table->__collate_load_error ?
298
			    c <= test && test <= c2 :
298
			    c <= test && test <= c2 :
299
			       __collate_range_cmp(table, c, test) <= 0
299
			       __wcollate_range_cmp(table, c, test) <= 0
300
			    && __collate_range_cmp(table, test, c2) <= 0
300
			    && __wcollate_range_cmp(table, test, c2) <= 0
301
			   )
301
			   )
302
				ok = 1;
302
				ok = 1;
303
		} else if (c == test)
303
		} else if (c == test)
(-)lib/libc/gen/glob.c (-2 / +2 lines)
Lines 832-839 Link Here
832
				if ((*pat & M_MASK) == M_RNG) {
832
				if ((*pat & M_MASK) == M_RNG) {
833
					if (table->__collate_load_error ?
833
					if (table->__collate_load_error ?
834
					    CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) :
834
					    CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) :
835
					       __collate_range_cmp(table, CHAR(c), CHAR(k)) <= 0
835
					       __wcollate_range_cmp(table, CHAR(c), CHAR(k)) <= 0
836
					    && __collate_range_cmp(table, CHAR(k), CHAR(pat[1])) <= 0
836
					    && __wcollate_range_cmp(table, CHAR(k), CHAR(pat[1])) <= 0
837
					   )
837
					   )
838
						ok = 1;
838
						ok = 1;
839
					pat += 2;
839
					pat += 2;
(-)lib/libc/locale/collate.h (+1 lines)
Lines 129-134 Link Here
129
void	_collate_lookup(struct xlocale_collate *,const wchar_t *, int *, int *,
129
void	_collate_lookup(struct xlocale_collate *,const wchar_t *, int *, int *,
130
	int, const int **);
130
	int, const int **);
131
int	__collate_range_cmp(struct xlocale_collate *, wchar_t, wchar_t);
131
int	__collate_range_cmp(struct xlocale_collate *, wchar_t, wchar_t);
132
int	__wcollate_range_cmp(struct xlocale_collate *, wchar_t, wchar_t);
132
size_t	_collate_wxfrm(struct xlocale_collate *, const wchar_t *, wchar_t *,
133
size_t	_collate_wxfrm(struct xlocale_collate *, const wchar_t *, wchar_t *,
133
	size_t);
134
	size_t);
134
size_t	_collate_sxfrm(struct xlocale_collate *, const wchar_t *, char *,
135
size_t	_collate_sxfrm(struct xlocale_collate *, const wchar_t *, char *,
(-)lib/libc/locale/collcmp.c (+10 lines)
Lines 53-55 Link Here
53
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
53
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
54
	return (wcscoll_l(s1, s2, &l));
54
	return (wcscoll_l(s1, s2, &l));
55
}
55
}
56
int __wcollate_range_cmp(struct xlocale_collate *table, wchar_t c1, wchar_t c2)
57
{
58
	static wchar_t s1[2], s2[2];
59
60
	s1[0] = c1;
61
	s2[0] = c2;
62
	struct _xlocale l = {{0}};
63
	l.components[XLC_COLLATE] = (struct xlocale_component *)table;
64
	return (wcscoll_l(s1, s2, &l));
65
}
(-)lib/libc/regex/regcomp.c (-3 / +3 lines)
Lines 821-830 Link Here
821
				(void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
821
				(void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
822
				CHaddrange(p, cs, start, finish);
822
				CHaddrange(p, cs, start, finish);
823
			} else {
823
			} else {
824
				(void)REQUIRE(__collate_range_cmp(table, start, finish) <= 0, REG_ERANGE);
824
				(void)REQUIRE(__wcollate_range_cmp(table, start, finish) <= 0, REG_ERANGE);
825
				for (i = 0; i <= UCHAR_MAX; i++) {
825
				for (i = 0; i <= UCHAR_MAX; i++) {
826
					if (   __collate_range_cmp(table, start, i) <= 0
826
					if (   __wcollate_range_cmp(table, start, i) <= 0
827
					    && __collate_range_cmp(table, i, finish) <= 0
827
					    && __wcollate_range_cmp(table, i, finish) <= 0
828
					   )
828
					   )
829
						CHadd(p, cs, i);
829
						CHadd(p, cs, i);
830
				}
830
				}

Return to bug 179721