From 96cb38342dc1ee9c4a7c3180d4ae102642b5cbb3 Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Thu, 3 Oct 2002 18:12:03 +0000 Subject: [PATCH] Cope with a GCC bug by using an alternative, but equivalent function prototype for regexec(). Noticed by: robert --- include/regex.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/regex.h b/include/regex.h index 658ce8ed6cec..2c49a41d8097 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