summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2022-04-01 20:41:26 (GMT)
committerGitHub <noreply@github.com>2022-04-01 20:41:26 (GMT)
commit572adbaacb126e530f6af94a90092e004c23a163 (patch)
tree1fc09f3d565a05a93800a5c4a9eefe582d03d8b0 /hl
parent210e0d91d158ea80e6d76d5656b2b467d0d1a9e6 (diff)
downloadhdf5-572adbaacb126e530f6af94a90092e004c23a163.zip
hdf5-572adbaacb126e530f6af94a90092e004c23a163.tar.gz
hdf5-572adbaacb126e530f6af94a90092e004c23a163.tar.bz2
Assume C99 fixed sized ints exist, use them (#470) (#1571)
* Committing clang-format changes * Assume C99 fixed sized ints exist, use them * Assume H5_SIZEOF_LONG_DOUBLE != 0, `long double` has existed since C89 Note, this is only assuming that `long double` exists, no assumptions about its size have been touched. Didn't remove any code that does things like test if `long double` and `double` have different sizes. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'hl')
-rw-r--r--hl/fortran/src/H5LTfc.c4
-rw-r--r--hl/src/H5LT.c2
2 files changed, 0 insertions, 6 deletions
diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c
index e87a9d3..4cb9265 100644
--- a/hl/fortran/src/H5LTfc.c
+++ b/hl/fortran/src/H5LTfc.c
@@ -319,11 +319,9 @@ h5ltset_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f
else if ((size_t)*sizeof_val == sizeof(double))
ret = H5LT_set_attribute_numerical(c_loc_id, c_name, c_attrname, c_size, H5T_NATIVE_DOUBLE,
(const double *)buf);
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if ((size_t)*sizeof_val == sizeof(long double))
ret = H5LT_set_attribute_numerical(c_loc_id, c_name, c_attrname, c_size, H5T_NATIVE_LDOUBLE,
(const long double *)buf);
-#endif
else
goto done;
}
@@ -413,10 +411,8 @@ h5ltget_attribute_c(hid_t_f *loc_id, size_t_f *namelen, _fcd dsetname, size_t_f
ret = H5LTget_attribute(c_loc_id, c_name, c_attrname, H5T_NATIVE_FLOAT, buf);
else if ((size_t)*sizeof_val == sizeof(double))
ret = H5LTget_attribute(c_loc_id, c_name, c_attrname, H5T_NATIVE_DOUBLE, buf);
-#if H5_SIZEOF_LONG_DOUBLE != 0
else if ((size_t)*sizeof_val == sizeof(long double))
ret = H5LTget_attribute(c_loc_id, c_name, c_attrname, H5T_NATIVE_LDOUBLE, buf);
-#endif
else
goto done;
}
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 4c13ea2..f58b461 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -2553,11 +2553,9 @@ H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *slen, hb
}
else if (H5Tequal(dtype, H5T_NATIVE_DOUBLE)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_DOUBLE");
-#if H5_SIZEOF_LONG_DOUBLE != 0
}
else if (H5Tequal(dtype, H5T_NATIVE_LDOUBLE)) {
HDsnprintf(dt_str, *slen, "H5T_NATIVE_LDOUBLE");
-#endif
}
else {
HDsnprintf(dt_str, *slen, "undefined float");