diff options
author | mike <mike@FreeBSD.org> | 2002-10-03 18:12:03 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-10-03 18:12:03 +0000 |
commit | 440b25e6ba5f82ee1735b88769c435ac11105327 (patch) | |
tree | b2359d47b9aef6e5589f11b330859f1ebf6edb92 /include/regex.h | |
parent | 6448ec6d62b52795cd96af767b261ed044ee49e1 (diff) | |
download | FreeBSD-src-440b25e6ba5f82ee1735b88769c435ac11105327.zip FreeBSD-src-440b25e6ba5f82ee1735b88769c435ac11105327.tar.gz |
Cope with a GCC bug by using an alternative, but equivalent function
prototype for regexec().
Noticed by: robert
Diffstat (limited to 'include/regex.h')
-rw-r--r-- | include/regex.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/regex.h b/include/regex.h index 658ce8e..2c49a41 100644 --- a/include/regex.h +++ b/include/regex.h @@ -105,8 +105,13 @@ typedef struct { __BEGIN_DECLS int regcomp(regex_t * __restrict, const char * __restrict, int); size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t); +/* + * XXX forth parameter should be `regmatch_t [__restrict]', but isn't because + * of a bug in GCC 3.2 (when -std=c99 is specified) which perceives this as a + * syntax error. + */ int regexec(const regex_t * __restrict, const char * __restrict, size_t, - regmatch_t [__restrict], int); + regmatch_t * __restrict, int); void regfree(regex_t *); __END_DECLS |