X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=m4%2Fregex.m4;fp=m4%2Fregex.m4;h=38f1dd76b61030a7afe77d8050a30a156d5ba695;hp=6bd6b8f7d4e6218874d715bf7041b9aa91cbdca6;hb=b414e25de8ca49d7567a92c203d431383ec57c83;hpb=29ece34f44a27750bbfd76154ad9882580453dc7 diff --git a/m4/regex.m4 b/m4/regex.m4 index 6bd6b8f..38f1dd7 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) @@ -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],