mutt stable branch with some hacks
at jcs 35 lines 900 B view raw
1dnl types.m4 2dnl macros for type checks not covered by autoconf 3 4dnl MUTT_C99_INTTYPES 5dnl Brendan Cully 6dnl 7# MUTT_C99_INTTYPES 8# Check for C99 integer type definitions, or define if missing 9AC_DEFUN([MUTT_C99_INTTYPES], 10[dnl 11AC_CHECK_HEADERS([inttypes.h]) 12AC_CHECK_TYPE([uint32_t], 13 [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])]) 14AC_CHECK_SIZEOF(short) 15AC_CHECK_SIZEOF(int) 16AC_CHECK_SIZEOF(long) 17AC_CHECK_SIZEOF(long long)]) 18AH_VERBATIM([X_HAVE_C99_INTTYPES], 19 [#ifndef HAVE_C99_INTTYPES 20# if SIZEOF_SHORT == 4 21typedef unsigned short uint32_t; 22# elif SIZEOF_INT == 4 23typedef unsigned int uint32_t; 24# elif SIZEOF_LONG == 4 25typedef unsigned long uint32_t; 26# endif 27# if SIZEOF_INT == 8 28typedef unsigned int uint64_t; 29# elif SIZEOF_LONG == 8 30typedef unsigned long uint64_t; 31# elif SIZEOF_LONG_LONG == 8 32typedef unsigned long long uint64_t; 33# endif 34#endif 35 ])