Back out non-collating [a-z] ranges.

Instead of changing the whole course to another POSIX-permitted way
for consistency and uniformity I decide to completely ignore missing
regex fucntionality and focus on fixing bugs in what we have now,
too many small obstacles we have choicing other way, counting ports.
Corresponding libc changes are backed out in r302824.
This commit is contained in:
Andrey A. Chernov 2016-07-14 09:45:07 +00:00
parent 2219fc0f38
commit 2fb2dbe8c0
2 changed files with 0 additions and 14 deletions

View File

@ -2664,11 +2664,7 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
return REG_ECOLLATE;
cmp_buf[0] = start_wc;
cmp_buf[4] = end_wc;
#ifdef __FreeBSD__
if (wcscmp (cmp_buf, cmp_buf + 4) > 0)
#else
if (wcscoll (cmp_buf, cmp_buf + 4) > 0)
#endif
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@ -2710,13 +2706,8 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
for (wc = 0; wc < SBC_MAX; ++wc)
{
cmp_buf[2] = wc;
#ifdef __FreeBSD__
if (wcscmp (cmp_buf, cmp_buf + 2) <= 0
&& wcscmp (cmp_buf + 2, cmp_buf + 4) <= 0)
#else
if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
&& wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
#endif
bitset_set (sbcset, wc);
}
}

View File

@ -3964,13 +3964,8 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
{
cmp_buf[0] = cset->range_starts[i];
cmp_buf[4] = cset->range_ends[i];
#ifdef __FreeBSD__
if (wcscmp (cmp_buf, cmp_buf + 2) <= 0
&& wcscmp (cmp_buf + 2, cmp_buf + 4) <= 0)
#else
if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
&& wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
#endif
{
match_len = char_len;
goto check_node_accept_bytes_match;