Try to deal with severe AIX <inttypes.h> braindamage

This commit is contained in:
hpa 2001-11-15 22:29:51 +00:00
parent 71e9b81cee
commit 818a5408bd
3 changed files with 62 additions and 1 deletions

27
aclocal.m4 vendored
View file

@ -123,6 +123,32 @@ int deny_severity = 0;
AC_MSG_RESULT([no])
])])
dnl ------------------------------------------------------------------------
dnl PA_CHECK_INTTYPES_H_SANE
dnl
dnl At least some versions of AIX 4 have <inttypes.h> macros which are
dnl completely broken. Try to detect those.
dnl --------------------------------------------------------------------------
AH_TEMPLATE([INTTYPES_H_IS_SANE],
[Define if the macros in <inttypes.h> are usable])
AC_DEFUN(PA_CHECK_INTTYPES_H_SANE,
[AC_CHECK_HEADERS(inttypes.h,
[
AC_MSG_CHECKING([if inttypes.h is sane])
AC_TRY_LINK(
[
#include <inttypes.h>
#include <stdio.h>
],
[uintmax_t max = UINTMAX_C(0);
printf("%"PRIuMAX"\n", max);],
AC_MSG_RESULT([yes])
AC_DEFINE(INTTYPES_H_IS_SANE),
AC_MSG_RESULT([no (AIX, eh?)]))
])
])
dnl ------------------------------------------------------------------------
dnl PA_WITH_BOOL
dnl
@ -170,3 +196,4 @@ int main()
AC_MSG_RESULT(no)
])])
dnl --------------------------------------------------------------------------