bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] re_compile_pattern check is broken


From: Tim Waugh
Subject: [patch] re_compile_pattern check is broken
Date: Thu, 16 Jan 2003 14:41:04 +0000
User-agent: Mutt/1.4i

Hi,

It was pointed out to me that the re_compile_pattern check was failing
for some reason.  On investigation, it turns out to be a broken test.

Tim.
*/

--- coreutils-4.5.3/aclocal.m4.regex    2003-01-16 14:29:30.000000000 +0000
+++ coreutils-4.5.3/aclocal.m4  2003-01-16 14:32:20.000000000 +0000
@@ -1214,6 +1214,7 @@
                   jm_cv_func_working_re_compile_pattern,
       AC_TRY_RUN(
 [#include <stdio.h>
+#include <string.h>
 #include <regex.h>
          int
          main ()
@@ -1222,12 +1223,14 @@
            const char *s;
            struct re_registers regs;
            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+           memset (&regex, 0, sizeof (regex));
            [s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, &regex);]
            /* This should fail with _Invalid character class name_ error.  */
            if (!s)
              exit (1);
 
            /* This should succeed, but doesn't for e.g. glibc-2.1.3.  */
+           memset (&regex, 0, sizeof (regex));
            s = re_compile_pattern ("{1", 2, &regex);
 
            if (s)
@@ -1235,6 +1238,7 @@
 
            /* The following example is derived from a problem report
                against gawk from Jorge Stolfi <address@hidden>.  */
+           memset (&regex, 0, sizeof (regex));
            s = re_compile_pattern ("[[an�]]*n", 7, &regex);
            if (s)
              exit (1);






reply via email to

[Prev in Thread] Current Thread [Next in Thread]