From: Rich Felker Date: Tue, 23 Jul 2013 00:58:04 +0000 (-0400) Subject: undefine internal-use type macros at the end of alltypes.h X-Git-Tag: v0.9.12~39 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9578f0530ae9eebfc9928b76f8ab2972131c2dac;p=oweals%2Fmusl.git undefine internal-use type macros at the end of alltypes.h this patch is something of a compromise for a compatibility regression discovered after the header refactoring: libtiff uses _Int64 for its own use. this is absolutely wrong, invalid C, and should not be supported, but it's also frustrating for users when code that used to work suddenly breaks. rather than leave the breakage in place or change musl internals to accommodate broken software, I've found a change that makes the problem go away and improves musl. by undefining these macros at the end of alltypes.h, the temptation to use them in other headers is removed. (for example, I almost used _Int64 in sys/types.h to define u_int64_t rather than adding it back to alltypes.h.) by confining use of these macros to alltypes.h, we keep it easy to go back and change the implementation of alltypes later, if needed. --- diff --git a/include/alltypes.h.in b/include/alltypes.h.in index 6f703583..c4ca5d52 100644 --- a/include/alltypes.h.in +++ b/include/alltypes.h.in @@ -66,3 +66,7 @@ STRUCT iovec { void *iov_base; size_t iov_len; }; TYPEDEF unsigned socklen_t; TYPEDEF unsigned short sa_family_t; + +#undef _Addr +#undef _Int64 +#undef _Reg