Don't override --enable-multi-arch.
[glibc.git] / posix / bug-regex31.c
blob974e8603b9696d0015f96cef29cd0266a505d40e
1 #include <mcheck.h>
2 #include <regex.h>
3 #include <stdio.h>
4 #include <sys/types.h>
6 int
7 main (void)
9 mtrace ();
11 int res = 0;
12 char *buf = NULL;
13 size_t len = 0;
14 while (! feof (stdin))
16 ssize_t n = getline (&buf, &len, stdin);
17 if (n <= 0)
18 break;
19 if (buf[n - 1] == '\n')
20 buf[n - 1] = '\0';
22 regex_t regex;
23 int rc = regcomp (&regex, buf, REG_EXTENDED);
24 if (rc != 0)
25 printf ("%s: Error %d (expected)\n", buf, rc);
26 else
28 printf ("%s: succeeded !\n", buf);
29 res = 1;
33 free (buf);
35 return 0;