7 # Define intmax_t to long or long long if <inttypes.h> doesn't define.
9 AC_DEFUN([jm_AC_TYPE_INTMAX_T],
11 AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
12 AC_CHECK_TYPE(intmax_t, ,
13 [test $ac_cv_type_long_long = yes \
14 && ac_type='long long' \
16 AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
17 [Define to widest signed type if <inttypes.h> doesn't define.])])
20 # Define uintmax_t to unsigned long or unsigned long long
21 # if <inttypes.h> doesn't define.
23 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
25 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
26 AC_CHECK_TYPE(uintmax_t, ,
27 [test $ac_cv_type_unsigned_long_long = yes \
28 && ac_type='unsigned long long' \
29 || ac_type='unsigned long'
30 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
31 [Define to widest unsigned type if <inttypes.h> doesn't define.])])