Hi Paul, > I installed the > attached into Gnulib and it should appear in the next gzip release.
Thanks for the fix. For completeness, I believe the attached patch would have fixed it as well. It follows the _GL_INCLUDING_* or _GL_ALREADY_INCLUDING_* idiom and gets away without duplicating declarations. But it's more hairy (harder to understand and may break in future platforms). Bruno
diff --git a/lib/endian.in.h b/lib/endian.in.h index c07aa612f0..b3a57b4949 100644 --- a/lib/endian.in.h +++ b/lib/endian.in.h @@ -24,6 +24,19 @@ #endif @PRAGMA_COLUMNS@ +#if defined _GL_INCLUDING_SYS_TYPES_H +/* Special invocation convention: + On glibc 2.4 with gcc 4.1, we have a sequence of nested includes + <byteswap.h> -> <stdint.h> -> <sys/types.h> -> <endian.h> -> <byteswap.h>. + In this situation, <byteswap.h> cannot be included, therefore we should + include only the system's <endian.h>. */ + +#@INCLUDE_NEXT@ @NEXT_ENDIAN_H@ + +#else +/* Normal invocation convention. */ + + #if @HAVE_ENDIAN_H@ /* The include_next requires a split double-inclusion guard. */ @@ -263,3 +276,4 @@ _GL_INLINE_HEADER_END #endif /* @ENDIAN_H_JUST_MISSING_STDINT@ */ #endif /* _@GUARD_PREFIX@_ENDIAN_H */ #endif /* _@GUARD_PREFIX@_ENDIAN_H */ +#endif /* _GL_INCLUDING_SYS_TYPES_H */
