Re: [PATCH 01/11] Fix build failure at VC because function declare use old style at regex.c

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

 



Hi,

reading "X-Mailer: git-send-email 1.6.4.msysgit.0" gave me a buzz... well 
done, Erik!

On Tue, 18 Aug 2009, Frank Li wrote:

> regerror declare function argument type after function define.
> 
> Signed-off-by: Frank Li <lznuaa@xxxxxxxxx>

How about

	Avoid a K&R style function definition in regex.c

	Microsoft Visual C++ does not understand K&R notation; use C89 
	style instead.

?

> diff --git a/compat/regex/regex.c b/compat/regex/regex.c
> index 5ea0075..5728de1 100644
> --- a/compat/regex/regex.c
> +++ b/compat/regex/regex.c
> @@ -4852,11 +4852,7 @@ regexec (preg, string, nmatch, pmatch, eflags)
>     from either regcomp or regexec.   We don't use PREG here.  */
>  
>  size_t
> -regerror (errcode, preg, errbuf, errbuf_size)
> -    int errcode;
> -    const regex_t *preg;
> -    char *errbuf;
> -    size_t errbuf_size;
> +regerror (int errcode, const regex_t * preg, char * errbuf,size_t errbuf_size)

A cursory look over regex.c gives me the impression that

- it tries to stick to maximally 80 characters per line,
- there is no space after a * indicating a pointer,
- there are spaces after all commas,
- there are a lot more functions with K&R style function definitions than 
  just regerror().

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]