aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regcomp.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a509e9a2..8eb3b701 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jun 8 22:41:30 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * regcomp.c (build_range_exp): Add check for RE_NO_EMPTY_RANGES
+ from GNULIB regcomp.c, courtesy of GNU grep.
+
Wed Jun 8 22:10:03 2011 Arnold D. Robbins <arnold@skeeve.com>
* dfa.c: Sync with GNU grep.
diff --git a/regcomp.c b/regcomp.c
index 5f5fa39f..22c79cdb 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -2702,7 +2702,8 @@ build_range_exp (reg_syntax_t syntax, bitset_t sbcset,
cmp_buf[4] = end_wc;
if (ignore_locales && start_wc > end_wc)
return REG_ERANGE;
- else if (wcscoll (cmp_buf, cmp_buf + 4) > 0)
+ else if ((syntax & RE_NO_EMPTY_RANGES)
+ && wcscoll (cmp_buf, cmp_buf + 4) > 0)
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.