[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] argp and MinGW
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] argp and MinGW |
Date: |
Mon, 23 Oct 2006 14:04:48 +0200 |
User-agent: |
KMail/1.9.1 |
Paul Eggert wrote:
> Bruno Haible <address@hidden> writes:
>
> > * lib/argp.h (argp_parse, __argp_parse): Use _argc, _argv as argument
> > names, not __argc, __argv. (The latter are defined as macros on mingw.)
>
> glibc headers must also be robust against user code that does "#define
> _argc some_weird_macro" as well. This is because the C standard
> reserves single-underscore identifiers like _argc only for use as
> identifiers with file scope in the ordinary and tag name spaces.
Ah, good to know that we are allowed to use macros starting with one
underscore.
> I suppose you can use /*argc*/ instead....
OK, I applied this:
2006-10-23 Bruno Haible <address@hidden>
Paul Eggert <address@hidden>
* lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
__argc, __argv from the declaration. (They are defined as macros on
mingw.)
*** lib/argp.h 10 Sep 2006 11:51:42 -0000 1.14
--- lib/argp.h 23 Oct 2006 12:06:48 -0000
***************
*** 413,423 ****
returned. This function may also call exit unless the ARGP_NO_HELP flag
is set. INPUT is a pointer to a value to be passed in to the parser. */
extern error_t argp_parse (const struct argp *__restrict __argp,
! int __argc, char **__restrict __argv,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);
extern error_t __argp_parse (const struct argp *__restrict __argp,
! int __argc, char **__restrict __argv,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);
--- 413,423 ----
returned. This function may also call exit unless the ARGP_NO_HELP flag
is set. INPUT is a pointer to a value to be passed in to the parser. */
extern error_t argp_parse (const struct argp *__restrict __argp,
! int /*argc*/, char **__restrict /*argv*/,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);
extern error_t __argp_parse (const struct argp *__restrict __argp,
! int /*argc*/, char **__restrict /*argv*/,
unsigned __flags, int *__restrict __arg_index,
void *__restrict __input);