summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt15
-rw-r--r--fortran/src/H5Fff.F901
-rw-r--r--fortran/src/H5Sf.c9
-rw-r--r--fortran/src/H5VLff.F901
-rw-r--r--fortran/src/H5match_types.c6
-rw-r--r--fortran/test/CMakeLists.txt21
-rw-r--r--fortran/test/tH5O_F03.F903
7 files changed, 28 insertions, 28 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 4e60361..315dc85 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -356,8 +356,13 @@ install (
${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
- ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
+ if (NOT ONLY_SHARED_LIBS)
+ ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
+ else ()
+ ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.F90
+ endif ()
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
@@ -383,6 +388,7 @@ if (NOT ONLY_SHARED_LIBS)
${MOD_BUILD_DIR}/h5r.mod
${MOD_BUILD_DIR}/h5s.mod
${MOD_BUILD_DIR}/h5t.mod
+ ${MOD_BUILD_DIR}/h5vl.mod
${MOD_BUILD_DIR}/h5z.mod
${MOD_BUILD_DIR}/h5_gen.mod
)
@@ -415,6 +421,7 @@ if (BUILD_SHARED_LIBS)
${MODSH_BUILD_DIR}/h5r.mod
${MODSH_BUILD_DIR}/h5s.mod
${MODSH_BUILD_DIR}/h5t.mod
+ ${MODSH_BUILD_DIR}/h5vl.mod
${MODSH_BUILD_DIR}/h5z.mod
${MODSH_BUILD_DIR}/h5_gen.mod
)
@@ -437,8 +444,8 @@ if (HDF5_EXPORTED_TARGETS)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
endif ()
if (NOT ONLY_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries)
endif ()
install (
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index ac3a1c0..8574c06 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -591,7 +591,6 @@ CONTAINS
! is an HDF5 file
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
- INTEGER(HID_T) :: access_prp_default
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" flag from C routine
! to define status value.
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 1031914..e3a5809 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -1031,22 +1031,21 @@ h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_
hsize_t *c_block = NULL;
H5S_seloper_t c_op;
- herr_t status;
int rank;
int i;
rank = H5Sget_simple_extent_ndims(*space_id);
if (rank < 0 ) return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_start == NULL) goto DONE;
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_count == NULL) goto DONE;
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_stride == NULL) goto DONE;
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_block == NULL) goto DONE;
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90
index 9abc157..e21f38f 100644
--- a/fortran/src/H5VLff.F90
+++ b/fortran/src/H5VLff.F90
@@ -217,7 +217,6 @@ CONTAINS
!*****
CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
INTEGER(SIZE_T) :: l
- TYPE(C_PTR) :: f_ptr
INTERFACE
INTEGER(SIZE_T) FUNCTION H5VLget_connector_name(obj_id, name, size) BIND(C,NAME='H5VLget_connector_name')
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 57f7dda..e39e85a 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -143,7 +143,7 @@ void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char
int main(void)
{
int i;
- char chrA[32],chrB[32];
+ char chrA[64],chrB[64];
int IntKinds[] = H5_FORTRAN_INTEGER_KINDS;
int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
@@ -347,8 +347,8 @@ int main(void)
for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) {
if (RealKinds[i] > 0) {
- sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]);
- sprintf(chrB, "real_%s_f", Real_C_TYPES[i]);
+ snprintf(chrA, sizeof(chrA), "Fortran_REAL_%s", Real_C_TYPES[i]);
+ snprintf(chrB, sizeof(chrB), "real_%s_f", Real_C_TYPES[i]);
writeToFiles("float",chrA, chrB, RealKinds[i]);
}
}
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 3f049af..9c68860 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -31,13 +31,12 @@ set_target_properties (H5_test_buildiface PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-if (BUILD_SHARED_LIBS)
- file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
-endif ()
-if (NOT ONLY_SHARED_LIBS)
+if (NOT BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
+else ()
+ file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
#-----------------------------------------------------------------------------
@@ -51,9 +50,9 @@ if (NOT BUILD_SHARED_LIBS)
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC)
- target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE
- ${HDF5_F90_C_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
+ target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
+ PRIVATE ${HDF5_F90_C_LIB_TARGET}
+ PUBLIC ${HDF5_TEST_LIB_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
@@ -70,9 +69,9 @@ else ()
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED)
- target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE
- ${HDF5_F90_C_LIBSH_TARGET}
- ${HDF5_TEST_LIBSH_TARGET}
+ target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
+ PRIVATE ${HDF5_F90_C_LIBSH_TARGET}
+ PUBLIC ${HDF5_TEST_LIBSH_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES
diff --git a/fortran/test/tH5O_F03.F90 b/fortran/test/tH5O_F03.F90
index d1a9ddb..bc3668c 100644
--- a/fortran/test/tH5O_F03.F90
+++ b/fortran/test/tH5O_F03.F90
@@ -270,12 +270,9 @@ CONTAINS
! A(8) = tm_yday int days since January 1 0-365
! A(9) = tm_isdst int Daylight Saving Time flag
!
- INTEGER(C_INT), DIMENSION(:), POINTER :: c_atime, c_btime, c_ctime, c_mtime
- INTEGER(C_INT), DIMENSION(1:8) :: atime, btime, ctime, mtime
INTEGER :: len, i
INTEGER :: idx
INTEGER :: ierr
- TYPE(C_PTR) :: cptr
visit_obj_cb = 0