- ], [
- suff64=i64
- suffu64=ui64
- ])
- fi
- fi
- dnl Here we assume a standard architecture where the hardware integer
- dnl types have 8, 16, 32, optionally 64 bits.
- gl_STDINT_MISSING_BOUND([INT8_MIN], [-128],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT8_MAX], [127],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT8_MAX], [255],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT16_MIN], [-32768],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT16_MAX], [32767],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT16_MAX], [65535],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT32_MIN], [(~INT32_MAX)],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT32_MAX], [2147483647],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT32_MAX], [4294967295U],
- [Define if <stdint.h> doesn't define it.])
- if test $gl_cv_stdint_int64_t = yes; then
- gl_STDINT_MISSING_BOUND([INT64_MIN], [(~INT64_MAX)],
- [Define if <stdint.h> doesn't define it but has the int64_t type.])
- gl_STDINT_MISSING_BOUND([INT64_MAX], [9223372036854775807${suff64}],
- [Define if <stdint.h> doesn't define it but has the int64_t type.])
- fi
- if test $gl_cv_stdint_uint64_t = yes; then
- gl_STDINT_MISSING_BOUND([UINT64_MAX], [18446744073709551615${suffu64}],
- [Define if <stdint.h> doesn't define it but has the uint64_t type.])
- fi
- dnl Here we assume a standard architecture where the hardware integer
- dnl types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
- dnl are the same as the corresponding N_t types.
- gl_STDINT_MISSING_BOUND([INT_LEAST8_MIN], [INT8_MIN],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT_LEAST8_MAX], [INT8_MAX],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT_LEAST8_MAX], [UINT8_MAX],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT_LEAST16_MIN], [INT16_MIN],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT_LEAST16_MAX], [INT16_MAX],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT_LEAST16_MAX], [UINT16_MAX],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT_LEAST32_MIN], [INT32_MIN],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([INT_LEAST32_MAX], [INT32_MAX],
- [Define if <stdint.h> doesn't define it.])
- gl_STDINT_MISSING_BOUND([UINT_LEAST32_MAX], [UINT32_MAX],
- [Define if <stdint.h> doesn't define it.])
- if test $gl_cv_stdint_int_least64_t = yes; then
- gl_STDINT_MISSING_BOUND([INT_LEAST64_MIN], [INT64_MIN],
- [Define if <stdint.h> doesn't define it but has the int_least64_t type.])
- gl_STDINT_MISSING_BOUND([INT_LEAST64_MAX], [INT64_MAX],
- [Define if <stdint.h> doesn't define it but has the int_least64_t type.])
- fi
- if test $gl_cv_stdint_uint_least64_t = yes; then
- gl_STDINT_MISSING_BOUND([UINT_LEAST64_MAX], [UINT64_MAX],
- [Define if <stdint.h> doesn't define it but has the uint_least64_t type.])
- fi
- dnl Here we assume a standard architecture where the hardware integer
- dnl types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- dnl are taken from the same list of types.
- gl_STDINT_MISSING_BOUNDS([INT_FAST8_MIN INT_FAST8_MAX UINT_FAST8_MAX \
- INT_FAST16_MIN INT_FAST16_MAX UINT_FAST16_MAX \
- INT_FAST32_MIN INT_FAST32_MAX UINT_FAST32_MAX])
- if test $gl_cv_stdint_uint_fast64_t = yes; then
- gl_STDINT_MISSING_BOUNDS([INT_FAST64_MIN INT_FAST64_MAX])
- fi
- if test $gl_cv_stdint_uint_fast64_t = yes; then
- gl_STDINT_MISSING_BOUNDS([UINT_FAST64_MAX])
- fi
- gl_STDINT_MISSING_BOUNDS([INTPTR_MIN INTPTR_MAX UINTPTR_MAX \
- INTMAX_MIN INTMAX_MAX UINTMAX_MAX])
- gl_STDINT_MISSING_BOUNDS([PTRDIFF_MIN PTRDIFF_MAX], [#include <stddef.h>])
- gl_SIZE_MAX
- gl_STDINT_MISSING_BOUNDS2([SIG_ATOMIC_MIN SIG_ATOMIC_MAX],
- [#include <signal.h>])
- dnl Don't bother defining WCHAR_MIN and WCHAR_MAX, since they should
- dnl already be defined in <stddef.h> or <wchar.h>.
- dnl For wint_t we need <wchar.h>.
- dnl Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included
- dnl before <wchar.h>.
- dnl BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
- dnl <wchar.h>.
- gl_STDINT_MISSING_BOUNDS2([WINT_MIN WINT_MAX], [
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-])
- STDINT_H=''
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+]], [[
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return mv - macro_values + 1;
+ }
+ return 0;
+]])],
+ [gl_cv_header_working_stdint_h=yes],
+ [],
+ [dnl When cross-compiling, assume it works.
+ gl_cv_header_working_stdint_h=yes
+ ])
+ ])
+ ])
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=