This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
regex.h not self contained
- To: libc-alpha at sources dot redhat dot com
- Subject: regex.h not self contained
- From: Bruno Haible <haible at ilog dot fr>
- Date: Mon, 22 Oct 2001 10:56:58 +0200 (CEST)
Hi,
Inclusion of <regex.h> as first system header leads to a compilation error.
But the current POSIX draft says only <regex.h> is needed in order to use
regcomp(), regexec(). To reproduce:
$ cat a.c
#include <regex.h>
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
$ gcc -c a.c
In file included from a.c:1:
/usr/include/regex.h:357: parse error before `size_t'
/usr/include/regex.h:357: warning: no semicolon at end of struct or union
/usr/include/regex.h:364: parse error before `:'
/usr/include/regex.h:373: parse error before `:'
/usr/include/regex.h:377: parse error before `:'
/usr/include/regex.h:381: parse error before `:'
/usr/include/regex.h:385: parse error before `:'
/usr/include/regex.h:388: parse error before `:'
/usr/include/regex.h:391: parse error before `:'
/usr/include/regex.h:455: parse error before `size_t'
/usr/include/regex.h:543: parse error before `size_t'
/usr/include/regex.h:547: parse error before `regerror'
/usr/include/regex.h:548: parse error before `size_t'
/usr/include/regex.h:548: warning: data definition has no type or storage class