X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fregex.m4;h=424ae333a3c756c07664b8e2b3ce1afd03ccecf5;hb=3b07ac4d2688471de4c8979e914a5b688b3b66fe;hp=3334c1041dbd69e6ddf055fcadc1d25a60c81cfc;hpb=6169015de81eaa4f8148d29abcd640b4f4ab1b56;p=gnulib.git diff --git a/m4/regex.m4 b/m4/regex.m4 index 3334c1041..424ae333a 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -84,17 +84,28 @@ AC_DEFUN([gl_REGEX], */ static char const pat[] = "[^x]x"; static char const data[] = - "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80" - "\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax"; + /* */ + "\xe1\x80\x80" + "\xe1\x80\xbb" + "\xe1\x80\xbd" + "\xe1\x80\x94" + "\xe1\x80\xba" + "\xe1\x80\xaf" + "\xe1\x80\x95" + "\xe1\x80\xba" + "x"; re_set_syntax (0); memset (®ex, 0, sizeof regex); s = re_compile_pattern (pat, sizeof pat - 1, ®ex); if (s) result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, 0) - != 21) - result |= 1; + else + { + i = re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, 0); + if (i != 0 && i != 21) + result |= 1; + } } if (! setlocale (LC_ALL, "C")) @@ -255,7 +266,8 @@ AC_DEFUN([gl_PREREQ_REGEX], AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_REQUIRE([gl_EEMALLOC]) + AC_REQUIRE([gl_GLIBC21]) AC_CHECK_HEADERS([libintl.h]) - AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) + AC_CHECK_FUNCS_ONCE([isblank iswctype]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) ])