# HG changeset patch # User Bruno Haible # Date 1193091166 -7200 # Node ID b785f4c49eb36d1c9f1d8aef3e68a9ca96f79152 # Parent 8e698de353f75d2346b766affb13bbb6460ae8c8 Add check that intmax_t and uintmax_t have the same size. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-22 Bruno Haible + + * lib/stdint.in.h: Add check that intmax_t and uintmax_t have the same + size. + 2007-10-22 Eric Blake Tweak x*printf documentation. diff --git a/lib/stdint.in.h b/lib/stdint.in.h --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -247,6 +247,11 @@ # define uintmax_t unsigned long int #endif +/* Verify that intmax_t and uintmax_t have the same size. Too much code + breaks if this is not the case. If this check fails, the reason is likely + to be found in the autoconf macros. */ +typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1]; + /* 7.18.2. Limits of specified-width integer types */ #if ! defined __cplusplus || defined __STDC_LIMIT_MACROS