diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-05-29 03:03:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 03:03:21 (GMT) |
commit | 4ef33ef7cd0f2af55b34682b6949a101a68436bb (patch) | |
tree | 0b47fc959d70acc9830d919602118d8fd85d879f /configure.ac | |
parent | 2da5855900d6e11d1db87a38f307fb72f95e809a (diff) | |
download | hdf5-4ef33ef7cd0f2af55b34682b6949a101a68436bb.zip hdf5-4ef33ef7cd0f2af55b34682b6949a101a68436bb.tar.gz hdf5-4ef33ef7cd0f2af55b34682b6949a101a68436bb.tar.bz2 |
Clean up type size checks in configure.ac (#702)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files 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 <sys/types.h> -EOF - -if test "X$C9x" = "Xyes"; then - cat >>confdefs.h <<\EOF +#include <stdbool.h> #include <stdint.h> +#ifdef HAVE_UNISTD_H +#include <sys/types.h> +#endif +#include <time.h> 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 <sys/types.h> /*for off_t definition*/ -EOF -AC_CHECK_SIZEOF([off_t]) - -if test "X$C9x" = "Xyes"; then - cat >>confdefs.h <<\EOF -#include <stdbool.h> -EOF -AC_CHECK_SIZEOF([bool]) -fi - -AC_CHECK_SIZEOF(time_t, [], [ -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_TIME_H -#include <time.h> -#endif -]) +AC_CHECK_SIZEOF([time_t]) ## Checkpoint the cache AC_CACHE_SAVE |