From: Bruno Haible Date: Mon, 22 Oct 2007 22:12:46 +0000 (+0200) Subject: Add check that intmax_t and uintmax_t have the same size. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65d19cd356b6851de04af028fa1fd7c02357fa67;p=pspp Add check that intmax_t and uintmax_t have the same size. --- diff --git a/ChangeLog b/ChangeLog index cf77f51ac3..c43b7c0731 100644 --- 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 index 121118cff7..ef0c335975 100644 --- 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