diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ChangeLog | 5 | ||||
-rw-r--r-- | m4/regex.m4 | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index e65971bc7..31d3999ed 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2006-04-09 Paul Eggert <eggert@cs.ucla.edu> + + * regex.m4 (gl_REGEX): Check for new glibc interface to + translation table. + 2006-03-11 Eric Blake <ebb9@byu.net> * double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT. diff --git a/m4/regex.m4 b/m4/regex.m4 index c6490d227..c60085250 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -#serial 35 +#serial 36 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006 Free Software Foundation, Inc. @@ -38,13 +38,19 @@ AC_DEFUN([gl_REGEX], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT + #include <limits.h> #include <regex.h> ], [[static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; const char *s; struct re_registers regs; re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof (regex)); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); /* This should fail with _Invalid character class name_ error. */ if (!s) |