X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fregex.m4;h=95784e4b5840af636b15cd8bc3a0b46976210021;hb=b187ff0528e2a081392a834e684d1d0c161708a7;hp=4e24b84c52c0a636f220910a4ebbc04f265d0fcc;hpb=9072c434ac94ee3e8352aba6c48de06bc62dfd50;p=gnulib.git diff --git a/m4/regex.m4 b/m4/regex.m4 index 4e24b84c5..95784e4b5 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,7 +1,7 @@ -# serial 55 +# serial 56 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -96,6 +96,14 @@ AC_DEFUN([gl_REGEX], if (!s) return 1; + /* 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) + return 1; + /* This should succeed, but does not for glibc-2.1.3. */ memset (®ex, 0, sizeof regex); s = re_compile_pattern ("{1", 2, ®ex);