diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2015-08-21 18:52:30 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2015-08-21 18:52:30 (GMT) |
commit | 7ce2d52cf69f6f6477e0f16e9d85d67cc54d5949 (patch) | |
tree | df01935167a5d011693bb791e582b60f375669d7 /config | |
parent | 1b2b0bd5a30cbc4227457abd08f563a8fd8c8b68 (diff) | |
download | hdf5-7ce2d52cf69f6f6477e0f16e9d85d67cc54d5949.zip hdf5-7ce2d52cf69f6f6477e0f16e9d85d67cc54d5949.tar.gz hdf5-7ce2d52cf69f6f6477e0f16e9d85d67cc54d5949.tar.bz2 |
[svn-r27545] Add first support for _Bool and make hbool_t a "real" _Bool if available
Fix tests accordingly
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/H5pubconf.h.in | 6 | ||||
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 37bcfbf..bbc1b95 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -581,6 +581,12 @@ /* The size of `__int64', as computed by sizeof. */ #define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@ +/* Define to 1 if you have the <stdbool.h> header file. */ +#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@ + +/* The size of `bool', as computed by sizeof. */ +#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@ + /* Define to 1 if you have the ANSI C header files. */ #cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index e058b10..f58c435 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -427,6 +427,19 @@ if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T) set (${HDF_PREFIX}_SIZEOF_OFF64_T 0) endif (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T) +#----------------------------------------------------------------------------- +# Extra C99 types +#----------------------------------------------------------------------------- + +# _Bool type support +CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H) +if (HAVE_STDBOOL_H) + set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h) + HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL) +else (HAVE_STDBOOL_H) + HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL) +endif (HAVE_STDBOOL_H) + if (NOT WINDOWS) #----------------------------------------------------------------------------- # Check if the dev_t type is a scalar type |