diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-09-28 15:31:22 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-09-28 15:31:22 (GMT) |
commit | c783decba564668b94009236d9b74f888fbae006 (patch) | |
tree | 222cd5851f208f69e4e1bc324eb1660ecbefcfc8 /fortran/src/H5match_types.c | |
parent | 2de91133e05ceb445645b3ac85e2a3ab7d792914 (diff) | |
download | hdf5-c783decba564668b94009236d9b74f888fbae006.zip hdf5-c783decba564668b94009236d9b74f888fbae006.tar.gz hdf5-c783decba564668b94009236d9b74f888fbae006.tar.bz2 |
[svn-r22840] Merged changes from the trunk into the branch,
svn merge -r22479:22826 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
tested: jam (gnu, intel, pgi)
koala (gnu, pgi)
Diffstat (limited to 'fortran/src/H5match_types.c')
-rw-r--r-- | fortran/src/H5match_types.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 61504ec..4c83d21 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -533,7 +533,21 @@ int main(void) /* double_f */ #if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND - writeFloatToFiles("Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND); + if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */ + writeFloatToFiles("Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND); + } else { +#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */ + writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND); + } +#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */ + writeFloatToFiles("Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND); + } +#else + /* Error: couldn't find a size for double_f when fortran has 16 byte reals */ + return -1; + } +#endif + #elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND); #else @@ -541,6 +555,14 @@ int main(void) return -1; #endif + /* Need the buffer size for the fortran derive type 'hdset_reg_ref_t_f03' + * in order to be interoperable with C's structure, the C buffer size + * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4) + */ + + fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 ); + + /* Close files */ endCfile(); endFfile(); |