summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-20 06:28:17 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-20 06:28:17 (GMT)
commit2094d8646199996f655bb5f56f142216bc2abfcf (patch)
tree2af40c4dddb881f62de5d61643e94932821ae29d /config
parent2af0d74216f1cdb0608a535a74c2a318a60b6e26 (diff)
downloadhdf5-2094d8646199996f655bb5f56f142216bc2abfcf.zip
hdf5-2094d8646199996f655bb5f56f142216bc2abfcf.tar.gz
hdf5-2094d8646199996f655bb5f56f142216bc2abfcf.tar.bz2
[svn-r28138] Add first support for _Bool and make hbool_t a "real" _Bool if available
Fix tests accordingly and fix misuse of hbool_t in various places Fix initialization of H5Pgcpl/ocpl structs in property decoding routines Tested on: Linux/32 (jam) Linux/64 (platypus) Linux/PPC64 (ostrich) MacOSX/64 10.11
Diffstat (limited to 'config')
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake13
2 files changed, 19 insertions, 0 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index fd3a1d6..f01a9ff 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -563,6 +563,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 e441c4a..c76129a 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -422,6 +422,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