X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fregex.m4;h=cd713660ef11859f6786f5b9ec9a5b0cff5823ea;hb=39ef09258d67f22b4e8b04981350c978577520bd;hp=c6490d227ed0a709d7ad4ca36eee9b3b9b64f072;hpb=f8211e803844eb6112f5f045709b808e2e089ebe;p=gnulib.git diff --git a/m4/regex.m4 b/m4/regex.m4 index c6490d227..cd713660e 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -#serial 35 +#serial 37 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006 Free Software Foundation, Inc. @@ -28,7 +28,7 @@ AC_DEFUN([gl_REGEX], yes|no) ac_use_included_regex=$with_included_regex ;; '') - # If the system regex support is good enough that it passes the the + # If the system regex support is good enough that it passes the # following run test, then default to *not* using the included regex.c. # If cross compiling, assume the test would fail and use the included # regex.c. The first failing regular expression is from `Spencer ere @@ -38,13 +38,19 @@ AC_DEFUN([gl_REGEX], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT + #include #include ], [[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) @@ -160,5 +166,6 @@ AC_DEFUN([gl_PREREQ_REGEX], AC_REQUIRE([gl_C_RESTRICT]) AC_REQUIRE([AM_LANGINFO_CODESET]) AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h]) - AC_CHECK_FUNCS_ONCE([isblank mbrtowc mempcpy wcrtomb wcscoll]) + AC_CHECK_FUNCS_ONCE([mbrtowc mempcpy wcrtomb wcscoll]) + AC_CHECK_DECLS([isblank], [], [], [#include ]) ])