Add check that intmax_t and uintmax_t have the same size.
authorBruno Haible <bruno@clisp.org>
Mon, 22 Oct 2007 22:12:46 +0000 (00:12 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 22 Oct 2007 22:34:57 +0000 (00:34 +0200)
ChangeLog
lib/stdint.in.h

index cf77f51ac380345fe19536182d1cf9c940d736fc..c43b7c0731da05d7177cf40201f5f92702848cce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-22  Bruno Haible  <bruno@clisp.org>
+
+       * lib/stdint.in.h: Add check that intmax_t and uintmax_t have the same
+       size.
+
 2007-10-22  Eric Blake  <ebb9@byu.net>
 
        Tweak x*printf documentation.
index 121118cff7100dacf1ab7dff01d1fdaa7df56080..ef0c335975678a579640f556bc3dcbe8636bfd63 100644 (file)
 # 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