summaryrefslogtreecommitdiff
path: root/lib/stdint.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-10-23 00:12:46 +0200
committerBruno Haible <bruno@clisp.org>2007-10-23 00:34:57 +0200
commit65d19cd356b6851de04af028fa1fd7c02357fa67 (patch)
treef0fc389bed2bc0315c6706b19cb4602654b27a54 /lib/stdint.in.h
parent796190dd51fa52a7a35be072c0eeeb7c37710c4d (diff)
downloadgnulib-65d19cd356b6851de04af028fa1fd7c02357fa67.tar.gz
Add check that intmax_t and uintmax_t have the same size.
Diffstat (limited to 'lib/stdint.in.h')
-rw-r--r--lib/stdint.in.h5
1 files changed, 5 insertions, 0 deletions
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