summaryrefslogtreecommitdiffstats
path: root/config/cmake/H5pubconf.h.in
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2021-02-20 14:11:24 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2021-02-20 14:11:24 (GMT)
commita544ef1441cc91f5d55d47deb13a0e90058825e5 (patch)
treed8ef3918808427bd4c0610d7047fc0301c6a9075 /config/cmake/H5pubconf.h.in
parent8d4a9d589b816276f729ef2091cb7efb7e31f034 (diff)
parent9dc3ddaad57625ee7f15eab912b48bee7ed0f325 (diff)
downloadhdf5-a544ef1441cc91f5d55d47deb13a0e90058825e5.zip
hdf5-a544ef1441cc91f5d55d47deb13a0e90058825e5.tar.gz
hdf5-a544ef1441cc91f5d55d47deb13a0e90058825e5.tar.bz2
Merge branch 'hdf5_1_12' of https://github.com/HDFGroup/hdf5 into hdf5_1_12
Diffstat (limited to 'config/cmake/H5pubconf.h.in')
-rw-r--r--config/cmake/H5pubconf.h.in23
1 files changed, 19 insertions, 4 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index fa21077..69c2d4a 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -605,6 +605,7 @@
#cmakedefine H5_SIZEOF_INT_LEAST8_T @H5_SIZEOF_INT_LEAST8_T@
#if !defined(__APPLE__)
+
/* The size of `size_t', as computed by sizeof. */
#cmakedefine H5_SIZEOF_SIZE_T @H5_SIZEOF_SIZE_T@
@@ -614,8 +615,17 @@
/* The size of `long', as computed by sizeof. */
#cmakedefine H5_SIZEOF_LONG @H5_SIZEOF_LONG@
+/* The size of `long double', as computed by sizeof. */
+#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+
#else
- # if defined(__LP64__) && __LP64__
+
+ /* On Apple, to support Universal Binaries (where multiple CPU
+ architectures exist in one library/executable), we can't assume
+ the machine doing the compiling has the same endianness or type
+ sizes as all the various architectures (PowerPC, Intel, ARM). */
+
+ # if defined(__LP64__) && __LP64__
#define H5_SIZEOF_LONG 8
#define H5_SIZEOF_SIZE_T 8
#define H5_SIZEOF_SSIZE_T 8
@@ -625,10 +635,15 @@
#define H5_SIZEOF_SSIZE_T 4
# endif
-#endif
+ # if defined(__i386__) || defined(__x86_64__)
+ #define H5_SIZEOF_LONG_DOUBLE 16
+ # elif defined(__aarch64__)
+ #define H5_SIZEOF_LONG_DOUBLE 8
+ # else
+ #cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+ # endif
-/* The size of `long double', as computed by sizeof. */
-#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+#endif
/* Define size of long long and/or __int64 bit integer type only if the type
exists. */