summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 22:16:30 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-04-23 22:16:30 (GMT)
commitfbf21b18ee7d83d2ff553ef3f920fba33708ded6 (patch)
tree94d717921218447e6e736b411f4bd9da97c8252a /fortran/src
parent47f189a194fc560af2afc937c1601e4bec733ae8 (diff)
downloadhdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.zip
hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.gz
hdf5-fbf21b18ee7d83d2ff553ef3f920fba33708ded6.tar.bz2
[svn-r26917] added conditional for C_LONG_DOUBLE
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Aff.F9019
-rw-r--r--fortran/src/H5Dff.F9017
-rw-r--r--fortran/src/H5Pff.F9031
-rw-r--r--fortran/src/H5config_f.inc.in3
4 files changed, 59 insertions, 11 deletions
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index dc54a0b..3a59e3b 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -64,10 +64,12 @@
!
!*****
+#include "H5config_f.inc"
+
MODULE H5A
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char, c_int, C_NULL_CHAR, C_LOC, &
- C_FLOAT, C_DOUBLE, C_LONG_DOUBLE
+ USE, INTRINSIC :: ISO_C_BINDING
+
USE H5GLOBAL
INTERFACE h5awrite_f
@@ -103,6 +105,7 @@ MODULE H5A
MODULE PROCEDURE h5awrite_c_double_5
MODULE PROCEDURE h5awrite_c_double_6
MODULE PROCEDURE h5awrite_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5awrite_c_long_double_scalar
MODULE PROCEDURE h5awrite_c_long_double_1
MODULE PROCEDURE h5awrite_c_long_double_2
@@ -111,6 +114,7 @@ MODULE H5A
MODULE PROCEDURE h5awrite_c_long_double_5
MODULE PROCEDURE h5awrite_c_long_double_6
MODULE PROCEDURE h5awrite_c_long_double_7
+#endif
! This is the preferred way to call h5awrite
! by passing an address
MODULE PROCEDURE h5awrite_ptr
@@ -149,6 +153,7 @@ MODULE H5A
MODULE PROCEDURE h5aread_c_double_5
MODULE PROCEDURE h5aread_c_double_6
MODULE PROCEDURE h5aread_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5aread_c_long_double_scalar
MODULE PROCEDURE h5aread_c_long_double_1
MODULE PROCEDURE h5aread_c_long_double_2
@@ -157,6 +162,7 @@ MODULE H5A
MODULE PROCEDURE h5aread_c_long_double_5
MODULE PROCEDURE h5aread_c_long_double_6
MODULE PROCEDURE h5aread_c_long_double_7
+#endif
! This is the preferred way to call h5aread
! by passing an address
MODULE PROCEDURE h5aread_ptr
@@ -2323,7 +2329,6 @@ CONTAINS
hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_c_double_6
-
SUBROUTINE h5awrite_c_double_7(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
@@ -2342,7 +2347,7 @@ CONTAINS
END SUBROUTINE h5awrite_c_double_7
-
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5awrite_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
@@ -2358,7 +2363,6 @@ CONTAINS
hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_c_long_double_scalar
-
SUBROUTINE h5awrite_c_long_double_1(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
@@ -2484,6 +2488,7 @@ CONTAINS
hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5awrite_c_long_double_7
+#endif
SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
@@ -3133,6 +3138,8 @@ CONTAINS
hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
+
SUBROUTINE h5aread_c_long_double_scalar(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
@@ -3272,6 +3279,8 @@ CONTAINS
hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr)
END SUBROUTINE h5aread_c_long_double_7
+#endif
+
SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 00f3975..090ea08 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -79,9 +79,11 @@
!
!*****
+#include "H5config_f.inc"
+
MODULE H5D
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_LONG_DOUBLE
+ USE, INTRINSIC :: ISO_C_BINDING
USE H5GLOBAL
INTERFACE h5dextend_f
@@ -135,6 +137,7 @@ MODULE H5D
MODULE PROCEDURE h5dwrite_c_double_5
MODULE PROCEDURE h5dwrite_c_double_6
MODULE PROCEDURE h5dwrite_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5dwrite_c_long_double_scalar
MODULE PROCEDURE h5dwrite_c_long_double_1
MODULE PROCEDURE h5dwrite_c_long_double_2
@@ -143,6 +146,7 @@ MODULE H5D
MODULE PROCEDURE h5dwrite_c_long_double_5
MODULE PROCEDURE h5dwrite_c_long_double_6
MODULE PROCEDURE h5dwrite_c_long_double_7
+#endif
! This is the preferred way to call h5dwrite
! by passing an address
MODULE PROCEDURE h5dwrite_ptr
@@ -183,6 +187,7 @@ MODULE H5D
MODULE PROCEDURE h5dread_c_double_5
MODULE PROCEDURE h5dread_c_double_6
MODULE PROCEDURE h5dread_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5dread_c_long_double_scalar
MODULE PROCEDURE h5dread_c_long_double_1
MODULE PROCEDURE h5dread_c_long_double_2
@@ -191,6 +196,7 @@ MODULE H5D
MODULE PROCEDURE h5dread_c_long_double_5
MODULE PROCEDURE h5dread_c_long_double_6
MODULE PROCEDURE h5dread_c_long_double_7
+#endif
! This is the preferred way to call h5dread
! by passing an address
MODULE PROCEDURE h5dread_ptr
@@ -242,7 +248,9 @@ MODULE H5D
MODULE PROCEDURE h5dfill_integer
MODULE PROCEDURE h5dfill_c_float
MODULE PROCEDURE h5dfill_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5dfill_c_long_double
+#endif
MODULE PROCEDURE h5dfill_char
END INTERFACE
@@ -3378,6 +3386,7 @@ CONTAINS
END SUBROUTINE h5dread_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5dread_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
IMPLICIT NONE
@@ -3661,6 +3670,7 @@ CONTAINS
file_space_id_default, xfer_prp_default, f_ptr)
END SUBROUTINE h5dread_c_long_double_7
+#endif
SUBROUTINE h5dwrite_c_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
@@ -3943,6 +3953,7 @@ CONTAINS
END SUBROUTINE h5dwrite_c_double_7
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5dwrite_c_long_double_scalar(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
IMPLICIT NONE
@@ -4223,6 +4234,7 @@ CONTAINS
file_space_id_default, xfer_prp_default, f_ptr)
END SUBROUTINE h5dwrite_c_long_double_7
+#endif
!****s* H5D (F03)/h5dwrite_f_F03
!
@@ -4502,6 +4514,7 @@ CONTAINS
END SUBROUTINE h5dfill_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr)
IMPLICIT NONE
REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value
@@ -4525,7 +4538,7 @@ CONTAINS
f_ptr_buf, mem_type_id)
END SUBROUTINE h5dfill_c_long_double
-
+#endif
!
! NAME
! h5dfill_char
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index b9d2240..4e74b9c 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -33,9 +33,7 @@
MODULE H5P
-! Can't specify ONLY because of a bug in gfortran < v4.7 Bug: 45190, 37829
- USE, INTRINSIC :: ISO_C_BINDING !, ONLY : c_ptr, c_null_ptr, c_funptr, c_null_funptr, &
-! c_char, c_int, C_NULL_CHAR, C_LOC, C_DOUBLE, C_FLOAT
+ USE, INTRINSIC :: ISO_C_BINDING
USE H5GLOBAL
INTERFACE h5pset_fapl_multi_f
@@ -47,7 +45,9 @@ MODULE H5P
MODULE PROCEDURE h5pset_fill_value_integer
MODULE PROCEDURE h5pset_fill_value_c_float
MODULE PROCEDURE h5pset_fill_value_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pset_fill_value_c_long_double
+#endif
MODULE PROCEDURE h5pset_fill_value_char
! Recommended procedure:
MODULE PROCEDURE h5pset_fill_value_ptr
@@ -58,7 +58,9 @@ MODULE H5P
MODULE PROCEDURE h5pget_fill_value_integer
MODULE PROCEDURE h5pget_fill_value_c_float
MODULE PROCEDURE h5pget_fill_value_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pget_fill_value_c_long_double
+#endif
MODULE PROCEDURE h5pget_fill_value_char
! Recommended procedure:
MODULE PROCEDURE h5pget_fill_value_ptr
@@ -69,7 +71,9 @@ MODULE H5P
MODULE PROCEDURE h5pset_integer
MODULE PROCEDURE h5pset_c_float
MODULE PROCEDURE h5pset_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pset_c_long_double
+#endif
MODULE PROCEDURE h5pset_char
! Recommended procedure:
MODULE PROCEDURE h5pset_ptr
@@ -80,7 +84,9 @@ MODULE H5P
MODULE PROCEDURE h5pget_integer
MODULE PROCEDURE h5pget_c_float
MODULE PROCEDURE h5pget_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pget_c_long_double
+#endif
! Recommended procedure:
MODULE PROCEDURE h5pget_ptr
END INTERFACE
@@ -89,7 +95,9 @@ MODULE H5P
MODULE PROCEDURE h5pregister_integer
MODULE PROCEDURE h5pregister_c_float
MODULE PROCEDURE h5pregister_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pregister_c_long_double
+#endif
! Recommended procedure:
MODULE PROCEDURE h5pregister_ptr
END INTERFACE
@@ -98,7 +106,9 @@ MODULE H5P
MODULE PROCEDURE h5pinsert_integer
MODULE PROCEDURE h5pinsert_c_float
MODULE PROCEDURE h5pinsert_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
MODULE PROCEDURE h5pinsert_c_long_double
+#endif
MODULE PROCEDURE h5pinsert_char
! Recommended procedure:
MODULE PROCEDURE h5pinsert_ptr
@@ -6295,6 +6305,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
END SUBROUTINE h5pset_fill_value_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5pset_fill_value_c_long_double(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
@@ -6308,6 +6319,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
f_ptr = C_LOC(fillvalue)
hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr)
END SUBROUTINE h5pset_fill_value_c_long_double
+#endif
SUBROUTINE h5pget_fill_value_c_float(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
@@ -6340,6 +6352,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pget_fill_value_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
SUBROUTINE h5pget_fill_value_c_long_double(prp_id, type_id, fillvalue, &
hdferr)
IMPLICIT NONE
@@ -6355,6 +6368,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr)
END SUBROUTINE h5pget_fill_value_c_long_double
+#endif
SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr)
IMPLICIT NONE
@@ -6617,6 +6631,9 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
END SUBROUTINE h5pset_c_double
+
+
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
!
!****s* H5P (F90)/h5pset_c_long_double
!
@@ -6654,6 +6671,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
END SUBROUTINE h5pset_c_long_double
+#endif
SUBROUTINE h5pset_char(prp_id, name, value, hdferr)
IMPLICIT NONE
@@ -6790,6 +6808,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
END SUBROUTINE h5pget_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
!****s* H5P (F90)/h5pget_c_long_double
!
! NAME
@@ -6826,6 +6845,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
name_len = LEN(name)
hdferr = h5pget_c(prp_id, name, name_len, f_ptr)
END SUBROUTINE h5pget_c_long_double
+#endif
SUBROUTINE h5pget_char(prp_id, name, value, hdferr)
IMPLICIT NONE
@@ -7049,7 +7069,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pregister_c_double
-
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
!
!****s* H5P/h5pregister_c_long_double
!
@@ -7092,6 +7112,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pregister_c(class, name, name_len, size, f_ptr)
END SUBROUTINE h5pregister_c_long_double
+#endif
SUBROUTINE h5pregister_char(class, name, size, value, hdferr)
IMPLICIT NONE
@@ -7277,6 +7298,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
END SUBROUTINE h5pinsert_c_double
+#ifdef H5_FORTRAN_HAVE_C_LONG_DOUBLE
!****s* H5P (F90)/h5pinsert_c_long_double
!
! NAME
@@ -7317,6 +7339,7 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr)
hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr)
END SUBROUTINE h5pinsert_c_long_double
+#endif
SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr)
IMPLICIT NONE
diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in
index ceecd36..dde4c11 100644
--- a/fortran/src/H5config_f.inc.in
+++ b/fortran/src/H5config_f.inc.in
@@ -11,3 +11,6 @@
! Define if the intrinsic function C_SIZEOF exists
#undef FORTRAN_HAVE_C_SIZEOF
+
+! Define if the intrinsic function C_LONG_DOUBLE exists
+#undef FORTRAN_HAVE_C_LONG_DOUBLE