summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5_f.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-16 21:47:00 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-06-16 21:47:00 (GMT)
commit85bcb7790404198084b47f9dcf49d8ab08f4aa4f (patch)
tree885bc468353f2a72b39d14169a0b03be7d1a7514 /fortran/src/H5_f.c
parent48086667b56335a9344115c79e5de75fff2f4089 (diff)
downloadhdf5-85bcb7790404198084b47f9dcf49d8ab08f4aa4f.zip
hdf5-85bcb7790404198084b47f9dcf49d8ab08f4aa4f.tar.gz
hdf5-85bcb7790404198084b47f9dcf49d8ab08f4aa4f.tar.bz2
[svn-r27221] Reworked Fortran autools REAL KIND detection.
Diffstat (limited to 'fortran/src/H5_f.c')
-rw-r--r--fortran/src/H5_f.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index f21528f..fa96ebe 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -227,27 +227,29 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
/*
* FIND H5T_NATIVE_REAL_C_LONG_DOUBLE
*/
-#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE
+#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0
if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) {
if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
} /*end if */
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) {
if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
} /*end if */
-# if FORTRAN_HAVE_C_LONG_DOUBLE!=0
+# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
- } /*end else */
+ if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) {
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ }
+ else {
+ if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ( H5Tset_precision (types[12], 128) < 0) return ret_value;
+ }
+ }
# else
- else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) {
- if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[12], 128) < 0) return ret_value;
- } /*end else */
+ if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ( H5Tset_precision (types[12], 64) < 0) return ret_value;
# endif
-
#else
- if ((types[12] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[12], 64) < 0) return ret_value;
+ if ((types[12] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
#endif
/*
* FIND H5T_NATIVE_B_8