[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
repairing regex [b-a] configure test
From: |
Jim Meyering |
Subject: |
repairing regex [b-a] configure test |
Date: |
Fri, 19 Mar 2010 22:17:46 +0100 |
In this message,
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20562/focus=20566
I planned to revert 18f8ae4bbed4d919e564fe54b94feb6bce2c4c8f
"ensure that the regexp [b-a] is diagnosed as invalid"
However, that test will actually be useful if ever run against
glibc's regex code when compiled without _LIBC, so I am instead
correcting it to use the RE_NO_EMPTY_RANGES bit flag.
This is the first of the 3 steps mentioned.
#2 adjusts regcomp.c to be consistent in the non-_LIBC case.
#3 makes the grep regex clients use RE_NO_EMPTY_RANGES.
>From 2268f0152e32337681be7d8efeb4204f22564a5e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 19 Mar 2010 21:43:30 +0100
Subject: [PATCH] regex.m4: correct the reversed range endpoint ([b-a]) test
* m4/regex.m4: When requiring that [b-a] evoke failure,
use RE_NO_EMPTY_RANGES. This makes this entire configure-time
test pass once again for x86-based systems.
---
ChangeLog | 7 +++++++
m4/regex.m4 | 7 ++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b6b6d6..7fe9472 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-03-19 Jim Meyering <address@hidden>
+
+ regex.m4: correct the reversed range endpoint ([b-a]) test
+ * m4/regex.m4: When requiring that [b-a] evoke failure,
+ use RE_NO_EMPTY_RANGES. This makes this entire configure-time
+ test pass once again for x86-based systems.
+
2010-03-19 Eric Blake <address@hidden>
logb: fix documentation
diff --git a/m4/regex.m4 b/m4/regex.m4
index 6bd6b8f..95784e4 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-# serial 55
+# serial 56
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
@@ -96,8 +96,9 @@ AC_DEFUN([gl_REGEX],
if (!s)
return 1;
- /* Ensure that [b-a] is diagnosed as invalid. */
- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ /* Ensure that [b-a] is diagnosed as invalid, when
+ using RE_NO_EMPTY_RANGES. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
memset (®ex, 0, sizeof regex);
s = re_compile_pattern ("a[b-a]", 6, ®ex);
if (s == 0)
--
1.7.0.2.455.g91132
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- repairing regex [b-a] configure test,
Jim Meyering <=