diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-05-28 16:53:15 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-05-28 16:53:15 (GMT) |
commit | 52e5579fbae41ee79f91eaeb66d452e8b1cc9e09 (patch) | |
tree | 0d3fa5ff4f7a4e89b9f469de821377f2fa8482f7 /fortran/src/H5match_types.c | |
parent | 0560c11c20476a8c99316bd88f1b6924afa057f9 (diff) | |
download | hdf5-52e5579fbae41ee79f91eaeb66d452e8b1cc9e09.zip hdf5-52e5579fbae41ee79f91eaeb66d452e8b1cc9e09.tar.gz hdf5-52e5579fbae41ee79f91eaeb66d452e8b1cc9e09.tar.bz2 |
[svn-r27122] removed dependency on generatored fortran source code
Diffstat (limited to 'fortran/src/H5match_types.c')
-rw-r--r-- | fortran/src/H5match_types.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index 35dbc19..2067f60 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -206,15 +206,19 @@ int main(void) /* (b) Define c_float_x */ + /* make sure we find long double first before checking for __float128 + * ideally we need to match precision instead of matching sizeof */ + + int found_longdb = 0; for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) { -#ifdef HAVE_FLOAT128 -/* should fail */ - if(sizeof(__float128) == RealKinds_SizeOf[i]) { +#ifdef H5_HAVE_FLOAT128 + if(sizeof(__float128) == RealKinds_SizeOf[i] && found_longdb == 1) { writeTypedef("float", "__float128", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_FLOAT128"); } else #endif if(sizeof(long double) == RealKinds_SizeOf[i]) { + found_longdb = 1; writeTypedef("float", "long double", RealKinds[i]); strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } else if(sizeof(double) == RealKinds_SizeOf[i]) { |