Daniel Martin wrote: > 1. > /bin/sh ../../libtool --tag=CC --mode=compile i386-mingw32-gcc > -DHAVE_CONFIG_H -I. -I../../../../gnulib/src -I../.. > -I/usr/local/i386-mingw32/include -c -o argp-parse.lo > ../../../../gnulib/src/argp-parse.c > i386-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../../gnulib/src -I../.. > -I/usr/local/i386-mingw32/include -c ../../../../gnulib/src/argp-parse.c > -DDLL_EXPORT -DPIC -o .libs/argp-parse.o > ../../../../gnulib/src/argp-parse.c:872: error: conflicting types for > 'argp_parse' > ../../../../gnulib/src/argp.h:413: error: previous declaration of > 'argp_parse' was here > ../../../../gnulib/src/argp-parse.c:872: error: conflicting types for > 'argp_parse' > ../../../../gnulib/src/argp.h:413: error: previous declaration of > 'argp_parse' was here > make[4]: *** [argp-parse.lo] Error 1 > > I can work around this though but editing argp.h:410-413 and removing > the names of the arguments. But of course this isn't really the > _correct_ way to fix this problem.
The problem is that mingw has #define __argc (*__p___argc()) #define __argv (*__p___argv()) But OTOH, glibc headers must be robust against user code that does #define argc some_weird_macro Sergey, is this ok to commit? 2006-10-19 Bruno Haible <[EMAIL PROTECTED]> * lib/argp.h (argp_parse, __argp_parse): Use _argc, _argv as argument names, not __argc, __argv. (The latter are defined as macros on mingw.) *** gnulib-20061019/lib/argp.h 2006-09-19 00:51:15.000000000 +0200 --- gnulib-20061019-modified/lib/argp.h 2006-10-20 02:23:50.000000000 +0200 *************** *** 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);