]> git.cworth.org Git - tar/blobdiff - m4/regex.m4
Merge branch 'upstream' into dfsg-orig
[tar] / m4 / regex.m4
index 6bd6b8f7d4e6218874d715bf7041b9aa91cbdca6..38f1dd76b61030a7afe77d8050a30a156d5ba695 100644 (file)
@@ -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 (&regex, 0, sizeof regex);
             s = re_compile_pattern ("a[b-a]", 6, &regex);
             if (s == 0)
@@ -157,12 +158,17 @@ AC_DEFUN([gl_REGEX],
             if (! REG_STARTEND)
               return 1;
 
-            /* Reject hosts whose regoff_t values are too narrow.
-               These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
-               and 32-bit int.  */
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
             if (sizeof (regoff_t) < sizeof (ptrdiff_t)
                 || sizeof (regoff_t) < sizeof (ssize_t))
               return 1;
+#endif
 
             return 0;]])],
        [gl_cv_func_re_compile_pattern_working=yes],