7
7
# Define intmax_t to long or long long if <inttypes.h> doesn't define.
9
AC_DEFUN([jm_AC_TYPE_INTMAX_T],
9
AC_DEFUN([gl_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.])])
11
dnl For simplicity, we assume that a header file defines 'intmax_t' if and
12
dnl only if it defines 'uintmax_t'.
13
AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
14
AC_REQUIRE([gl_AC_HEADER_STDINT_H])
15
if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
16
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
17
test $ac_cv_type_long_long = yes \
18
&& ac_type='long long' \
20
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
21
[Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
23
AC_DEFINE(HAVE_INTMAX_T, 1,
24
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
20
28
# Define uintmax_t to unsigned long or unsigned long long