From 3140d259219b2329f870435991c21373d5e767d1 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 28 May 2021 07:19:51 -0700 Subject: [PATCH] Clean up type size checks in configure.ac --- configure.ac | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 921e8c62edb..5fc05589556 100644 --- a/configure.ac +++ b/configure.ac @@ -1365,16 +1365,15 @@ CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" ## Checkpoint the cache AC_CACHE_SAVE -## Posix.1g types (C9x) +## Write the confdefs.h header for checking sizes cat >>confdefs.h <<\EOF -#include -EOF - -if test "X$C9x" = "Xyes"; then - cat >>confdefs.h <<\EOF +#include #include +#ifdef HAVE_UNISTD_H +#include +#endif +#include EOF -fi AC_CHECK_SIZEOF( [int8_t]) AC_CHECK_SIZEOF( [uint8_t]) @@ -1404,30 +1403,12 @@ AC_CHECK_SIZEOF([uint_least64_t]) AC_CHECK_SIZEOF( [int_fast64_t]) AC_CHECK_SIZEOF( [uint_fast64_t]) +AC_CHECK_SIZEOF([bool]) +AC_CHECK_SIZEOF([off_t]) +AC_CHECK_SIZEOF([ptrdiff_t]) AC_CHECK_SIZEOF([size_t]) AC_CHECK_SIZEOF([ssize_t]) -AC_CHECK_SIZEOF([ptrdiff_t]) - -cat >>confdefs.h <<\EOF -#include /*for off_t definition*/ -EOF -AC_CHECK_SIZEOF([off_t]) - -if test "X$C9x" = "Xyes"; then - cat >>confdefs.h <<\EOF -#include -EOF -AC_CHECK_SIZEOF([bool]) -fi - -AC_CHECK_SIZEOF(time_t, [], [ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_TIME_H -#include -#endif -]) +AC_CHECK_SIZEOF([time_t]) ## Checkpoint the cache AC_CACHE_SAVE