From 4ef33ef7cd0f2af55b34682b6949a101a68436bb Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri, 28 May 2021 20:03:21 -0700 Subject: Clean up type size checks in configure.ac (#702) --- configure.ac | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/configure.ac b/configure.ac index 921e8c6..5fc0558 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 -- cgit v0.12