regex-tests, regex: fix bug: memset undeclared
[gnulib.git] / m4 / regex.m4
index 944dfaf..ae89e31 100644 (file)
@@ -32,15 +32,16 @@ AC_DEFUN([gl_REGEX],
                    [gl_cv_func_re_compile_pattern_working],
       [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM(
-          [AC_INCLUDES_DEFAULT[
-           #include <locale.h>
-           #include <limits.h>
-           #include <regex.h>
-           #if HAVE_ALARM
-           # include <unistd.h>
-           # include <signal.h>
-           #endif
-           ]],
+          [[#include <regex.h>
+
+            #include <locale.h>
+            #include <limits.h>
+            #include <string.h>
+            #if HAVE_ALARM
+            # include <unistd.h>
+            # include <signal.h>
+            #endif
+          ]],
           [[int result = 0;
             static struct re_pattern_buffer regex;
             unsigned char folded_chars[UCHAR_MAX + 1];
@@ -92,7 +93,7 @@ AC_DEFUN([gl_REGEX],
                     result |= 1;
                   else if (re_search (&regex, data, sizeof data - 1,
                                       0, sizeof data - 1, 0)
-                           != 20)
+                           != 21)
                     result |= 1;
                 }