Re: [PATCH v2 05/14] Change regerror() definition from K&R style to ANSI C (C89)

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

 



On Fri, Aug 21, 2009 at 10:10 PM, Marius Storm-Olsen<mstormo@xxxxxxxxx> wrote:
>  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)
>  {

Since the real reason isn't the K&R style defintion, but that
"errcode" has been typedef'ed, perhaps it's better to either do
something like this:

#ifdef _MSC_VER
#define errcode dummy_def
#include <crtdefs.h>
#undef errcode
#endif

...before the first crt-inclusion, or simply to rename "errcode" to
something like "error"? The latter can be done with the preprocessor
after the first crt-inclusion.

-- 
Erik "kusma" Faye-Lund
kusmabite@xxxxxxxxx
(+47) 986 59 656
--
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]