If a project uses both modules argp and argz, error_t may be both #define'd, and set as typedef in argp.h. The #define from config.h (which comes ultimatively from argz.m4) kills the typedef of course.
For example on sparc-sun-solaris2.8: | cc -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DLIBDIR=\"/usr/local/lib\" -I. -I../../dummy-0/lib -I.. -D_REENTRANT -xarch=v9 -c ../../dummy-0/lib/argp-eexst.c | "../../dummy-0/lib/argp.h", line 64: invalid type combination | "../../dummy-0/lib/argp.h", line 64: warning: useless declaration | "../../dummy-0/lib/argp.h", line 64: warning: typedef declares no type name | cc: acomp failed for ../../dummy-0/lib/argp-eexst.c The hack below fixes that, but I can imagine that it is not an acceptable fix, given that this is libc code. Should we rather AC_DEFINE([__error_t_defined], 1, ..)? Thoughts? Cheers, Ralf * lib/argp.h: Only declare error_t if not #defined already. Index: lib/argp.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/argp.h,v retrieving revision 1.11 diff -u -r1.11 argp.h --- lib/argp.h 10 Jan 2006 21:49:07 -0000 1.11 +++ lib/argp.h 22 Feb 2006 17:31:25 -0000 @@ -61,7 +61,9 @@ #endif #ifndef __error_t_defined +# ifndef error_t typedef int error_t; +# endif # define __error_t_defined #endif _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib