summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5match_types.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5match_types.c')
-rw-r--r--fortran/src/H5match_types.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index c22f423..27d314e 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -211,16 +211,16 @@ int main(void)
if (sizeof(float) == RealKinds_SizeOf[i]) {
writeTypedef("float", "float", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT");
- } else if(sizeof(double) == RealKinds_SizeOf[i]) {
+ strcpy(Real_C_TYPES[i], "C_FLOAT"); }
+ else if(sizeof(double) == RealKinds_SizeOf[i]) {
writeTypedef("float", "double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_DOUBLE");
-/* may not have long double in fortran need check */
- } else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) {
+ strcpy(Real_C_TYPES[i], "C_DOUBLE"); }
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
+ else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) {
writeTypedef("float", "long double", RealKinds[i]);
strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE");
- found_long_double = 1;
- }
+ found_long_double = 1; }
+#endif
#ifdef H5_HAVE_FLOAT128
/* Don't select a higher precision than Fortran can support */
else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
@@ -240,15 +240,15 @@ int main(void)
/* } else if(sizeof(long double) > RealKinds_SizeOf[H5_FORTRAN_NUM_REAL_KINDS-2]) { */
/* writeTypedef("float", "long double", RealKinds[i]); */
/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */
- else {
- printf(" **** HDF5 WARNING ****\n");
- printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]);
- printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]);
+ else {
+ printf(" **** HDF5 WARNING ****\n");
+ printf("Fortran REAL is %d bytes, but no corresponding C floating type exists\n",RealKinds_SizeOf[i]);
+ printf("Fortran Interface will create a custom datatype to store Fortran Real\n",RealKinds_SizeOf[i]);
- writeTypedef("float", "long double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); }
- }
-/* } */
+/* writeTypedef("float", "long double", RealKinds[i]); */
+/* strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE"); } */
+ }
+ }
/* Now begin defining fortran types. */
fprintf(c_header, "\n");