summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in3
-rw-r--r--fortran/examples/CMakeLists.txt18
-rw-r--r--fortran/examples/Makefile.in6
-rw-r--r--fortran/src/CMakeLists.txt8
-rw-r--r--fortran/src/H5Af.c4
-rw-r--r--fortran/src/H5Ff.c35
-rw-r--r--fortran/src/H5Lf.c15
-rw-r--r--fortran/src/H5Pf.c125
-rw-r--r--fortran/src/H5Rf.c215
-rw-r--r--fortran/src/H5Sf.c4
-rw-r--r--fortran/src/H5Tf.c27
-rw-r--r--fortran/src/H5_f.c41
-rw-r--r--fortran/src/H5f90kit.c6
-rw-r--r--fortran/src/H5f90proto.h22
-rw-r--r--fortran/src/Makefile.in5
-rw-r--r--fortran/test/CMakeLists.txt24
-rw-r--r--fortran/test/Makefile.in3
-rw-r--r--fortran/test/tH5A_1_8.f906
-rw-r--r--fortran/testpar/CMakeLists.txt4
-rw-r--r--fortran/testpar/Makefile.in3
20 files changed, 283 insertions, 291 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 4e7f208..5995c65 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -157,6 +157,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -218,6 +219,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -274,6 +276,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 6fe6cc7..c0ddf32 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -37,8 +37,8 @@ SET (examples
FOREACH (example ${examples})
ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- H5_NAMING (f90_ex_${example})
- TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example})
+ H5_NAMING (f90_ex_${example} ${LIB_TYPE})
+ TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example} "")
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_${example}
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -50,12 +50,17 @@ FOREACH (example ${examples})
${HDF5_LIB_TARGET}
)
SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
+
+ IF (BUILD_TESTING)
+ ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
+ ENDIF (BUILD_TESTING)
+
ENDFOREACH (example ${examples})
IF (H5_HAVE_PARALLEL)
ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- H5_NAMING (f90_ex_ph5example)
- TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example)
+ H5_NAMING (f90_ex_ph5example ${LIB_TYPE})
+ TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example "")
IF (WIN32 AND NOT CYGWIN)
SET_PROPERTY (TARGET f90_ex_ph5example
APPEND PROPERTY COMPILE_DEFINITIONS
@@ -67,4 +72,9 @@ IF (H5_HAVE_PARALLEL)
${HDF5_LIB_TARGET}
)
SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
+
+ IF (BUILD_TESTING)
+ ADD_TEST (NAME f90_ex_ph5example COMMAND $<TARGET_FILE:f90_ex_ph5example>)
+ ENDIF (BUILD_TESTING)
+
ENDIF (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 4258d69..b3a123d 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -120,6 +120,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -181,6 +182,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -237,6 +239,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -656,7 +659,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 2af57c1..6a88eca 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -184,6 +184,7 @@ ENDIF (H5_HAVE_PARALLEL)
# Add Main fortran library
#-----------------------------------------------------------------------------
ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS})
+SET (SHARED_LINK_FLAGS " ")
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
@@ -191,11 +192,7 @@ IF (WIN32 AND NOT CYGWIN)
BUILD_HDF5_DLL
)
IF (MSVC)
- SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET}
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def"
- )
+ SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def")
ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET}
@@ -203,6 +200,7 @@ IF (WIN32 AND NOT CYGWIN)
HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
+TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS})
SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 939fd81..8e6158e 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -974,16 +974,16 @@ nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
int_f ret_value=0; /* Return value */
c_bufsize = (size_t)*bufsize+1;
+
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc(c_bufsize)) == NULL)
+ if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
HGOTO_DONE(FAIL);
/*
* Call H5Aget_name function
*/
-
if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, c_bufsize, c_buf)) < 0)
HGOTO_DONE(FAIL);
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 9640444..3cfc9e3 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -47,37 +47,36 @@ nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, h
* Define access flags
*/
c_access_flags = (unsigned) *access_flags;
+
/*
* Define creation property
*/
c_crt_prp = *crt_prp;
-/*
- if ( H5P_DEFAULT_F == c_crt_prp ) c_crt_prp = H5P_DEFAULT;
-*/
+
/*
* Define access property
*/
c_acc_prp = *acc_prp;
-/*
- if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
-*/
/*
* Convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
+ if(c_name == NULL)
+ return ret_value;
/*
* Call H5Fcreate function.
*/
c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp);
- if (c_file_id < 0) return ret_value;
- *file_id = c_file_id;
+ if (c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = c_file_id;
+ }
+
HDfree(c_name);
- ret_value = 0;
return ret_value;
}
@@ -238,31 +237,31 @@ nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hi
* Define access flags
*/
c_access_flags = (unsigned) *access_flags;
+
/*
* Define access property
*/
c_acc_prp = *acc_prp;
-/*
- if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
-*/
/*
* Convert FORTRAN name to C name
*/
c_namelen = *namelen;
c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
+ if(c_name == NULL)
+ return ret_value;
/*
* Call H5Fopen function.
*/
c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp);
- if (c_file_id < 0) return ret_value;
- *file_id = (hid_t_f)c_file_id;
+ if(c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = (hid_t_f)c_file_id;
+ } /* end if */
HDfree(c_name);
- ret_value = 0;
return ret_value;
}
@@ -520,7 +519,7 @@ nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc((size_t)*buflen +1)) == NULL)
+ if(NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
HGOTO_DONE(FAIL);
/*
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 4d3e31c..c971d5e 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -394,7 +394,7 @@ done:
* Modifications: N/A
*---------------------------------------------------------------------------*/
int_f
-nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
+nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
haddr_t_f *address, size_t_f *val_size,
hid_t_f *lapl_id)
@@ -406,16 +406,16 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
/*
* Convert FORTRAN name to C name
*/
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ HGOTO_DONE(FAIL);
+
/*
* Call H5Linfo function.
*/
if(H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
-
*cset = (int_f)link_buff.cset;
*corder = (int_f)link_buff.corder;
*corder_valid = 0;
@@ -425,6 +425,9 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
*val_size = (size_t_f)link_buff.u.val_size;
done:
+ if(c_link_name)
+ HDfree(c_link_name);
+
return ret_value;
}
@@ -606,7 +609,7 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_name = HDmalloc(c_size)) == NULL)
+ if(NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
if((*size = (size_t)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 96b771d..29ba593 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1,4 +1,3 @@
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
@@ -22,7 +21,7 @@
/*----------------------------------------------------------------------------
* Name: h5pcreate_c
* Purpose: Call H5Pcreate to create a property list
- * Inputs: class - property list class identifier
+ * Inputs: cls - property list class identifier
* Outputs: prp_id - identifier of the created property list
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
@@ -31,12 +30,12 @@
*---------------------------------------------------------------------------*/
int_f
-nh5pcreate_c ( hid_t_f *class, hid_t_f *prp_id )
+nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id )
{
hid_t c_prp_id;
int_f ret_value = 0;
- c_prp_id = H5Pcreate((hid_t)*class);
+ c_prp_id = H5Pcreate((hid_t)*cls);
if(c_prp_id < 0)
HGOTO_DONE(FAIL)
@@ -264,7 +263,7 @@ nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims )
herr_t status;
int i;
- c_dims = malloc(sizeof(hsize_t) * (*rank ));
+ c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * (*rank ));
if (!c_dims) return ret_value;
/*
@@ -309,7 +308,7 @@ nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
int c_max_rank;
int i;
- c_dims = malloc(sizeof(hsize_t) * (*max_rank ));
+ c_dims = (hsize_t *)HDmalloc(sizeof(hsize_t) * (*max_rank ));
if (!c_dims) return ret_value;
c_prp_id = (hid_t)*prp_id;
@@ -1311,8 +1310,8 @@ nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, h
c_meta_ext_size = (size_t) *meta_ext_size;
c_raw_ext_size = (size_t) *raw_ext_size;
- c_meta_ext = (char*)malloc(sizeof(char)*c_meta_ext_size);
- c_raw_ext = (char*)malloc(sizeof(char)*c_raw_ext_size);
+ c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
+ c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
if(c_meta_ext == NULL || c_raw_ext == NULL) return ret_value;
/*
@@ -1481,7 +1480,7 @@ nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nel
c_filter = (H5Z_filter_t)*filter;
c_flags = (unsigned)*flags;
c_cd_nelmts = (size_t)*cd_nelmts;
- c_cd_values = (unsigned int*)malloc(sizeof(unsigned int)*((int)c_cd_nelmts));
+ c_cd_values = (unsigned int*)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts));
if (!c_cd_values) return ret_value;
for (i = 0; i < c_cd_nelmts; i++)
c_cd_values[i] = (unsigned int)cd_values[i];
@@ -1566,10 +1565,10 @@ nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f*
c_cd_nelmts = (size_t)*cd_nelmts;
- if(NULL == (c_name = (char *)malloc((size_t)*namelen + 1)))
+ if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * c_cd_nelmts)))
+ if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
goto DONE;
/*
@@ -1702,7 +1701,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name,
/*
* Allocate memory to store the name of the external file.
*/
- if(c_namelen) c_name = (char*) HDmalloc(c_namelen + 1);
+ if(c_namelen) c_name = (char*)HDmalloc(c_namelen + 1);
if (c_name == NULL) return ret_value;
/*
@@ -2232,14 +2231,14 @@ nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
* Inputs: parent - property list class identifier
* name - name of the new class
* name_len - lenght of the "name" buffer
- * Outputs: class - new class identifier
+ * Outputs: cls - new class identifier
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* October 11, 2002
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *class)
+nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls)
{
int ret_value = -1;
hid_t c_parent;
@@ -2255,7 +2254,7 @@ nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *class)
*/
c_class = H5Pcreate_class(c_parent, c_name, NULL, NULL,NULL,NULL,NULL,NULL);
if (c_class < 0) goto DONE;
- *class = (hid_t_f)c_class;
+ *cls = (hid_t_f)c_class;
ret_value = 0;
DONE:
@@ -2266,7 +2265,7 @@ DONE:
/*----------------------------------------------------------------------------
* Name: h5pregisterc_c
* Purpose: Call h5pregister_c to registers a permanent property
- * Inputs: class - property list class identifier
+ * Inputs: cls - property list class identifier
* name - name of the new property
* name_len - length of the "name" buffer
* size - property size
@@ -2277,21 +2276,21 @@ DONE:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len)
+nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len)
{
int ret_value = -1;
/*
* Call h5pregister_c function
*/
- ret_value = nh5pregister_c(class, name, name_len, size, _fcdtocp(value));
+ ret_value = nh5pregister_c(cls, name, name_len, size, _fcdtocp(value));
return ret_value;
}
/*----------------------------------------------------------------------------
* Name: h5pregister_c
* Purpose: Call H5Pregister2 to registers a permanent property
- * Inputs: class - property list class identifier
+ * Inputs: cls - property list class identifier
* name - name of the new property
* name_len - length of the "name" buffer
* size - property size
@@ -2302,7 +2301,7 @@ nh5pregisterc_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, _fcd
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pregister_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
+nh5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
{
char* c_name = NULL;
int_f ret_value = -1;
@@ -2313,7 +2312,7 @@ nh5pregister_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void
/*
* Call H5Pregister2 function.
*/
- if(H5Pregister2((hid_t)*class, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
goto DONE;
ret_value = 0;
@@ -2324,30 +2323,30 @@ DONE:
}
int_f
-nh5pregister_integer_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void *value)
+nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
/*
* Call h5pregister_c function
*/
- return nh5pregister_c(class, name, name_len, size, value);
+ return nh5pregister_c(cls, name, name_len, size, value);
}
int_f
-nh5pregister_real_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void *value)
+nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
/*
* Call h5pregister_c function
*/
- return nh5pregister_c(class, name, name_len, size, value);
+ return nh5pregister_c(cls, name, name_len, size, value);
}
int_f
-nh5pregister_double_c(hid_t_f *class, _fcd name, int_f *name_len, size_t_f *size, void *value)
+nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
/*
* Call h5pregister_c function
*/
- return nh5pregister_c(class, name, name_len, size, value);
+ return nh5pregister_c(cls, name, name_len, size, value);
}
/*----------------------------------------------------------------------------
@@ -2450,7 +2449,7 @@ nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size,
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pexist_c(hid_t_f *class, _fcd name, int_f *name_len)
+nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
int_f ret_value = -1;
hid_t c_class;
@@ -2460,7 +2459,7 @@ nh5pexist_c(hid_t_f *class, _fcd name, int_f *name_len)
c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
if (c_name == NULL) goto DONE;
- c_class = (hid_t)*class;
+ c_class = (hid_t)*cls;
/*
* Call H5Pexist function.
*/
@@ -2476,21 +2475,21 @@ DONE:
* Purpose: Call H5Pisa_class to querie whether a property is a
* member of a class
* Inputs: plist - property list identifier
- * class - property class identifier
+ * cls - property class identifier
* Returns: nonnegative on success, -1 on failure
* Programmer: Elena Pourmal
* October 11, 2002
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pisa_class_c(hid_t_f *plist, hid_t_f *class)
+nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
{
int_f ret_value = -1;
hid_t c_class;
hid_t c_plist;
htri_t status;
- c_class = (hid_t)*class;
+ c_class = (hid_t)*cls;
c_plist = (hid_t)*plist;
/*
@@ -2663,7 +2662,7 @@ DONE:
/*----------------------------------------------------------------------------
* Name: h5punregister_c
* Purpose: Call H5Punregister to remove a property from a property class
- * Inputs: class - identifier of property class
+ * Inputs: cls - identifier of property class
* name - name of the property to unregister
* name_len - length of the "name" buffer
* Returns: 0 on success, -1 on failure
@@ -2672,7 +2671,7 @@ DONE:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5punregister_c(hid_t_f *class, _fcd name, int_f *name_len)
+nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
int_f ret_value = -1;
hid_t c_class;
@@ -2681,7 +2680,7 @@ nh5punregister_c(hid_t_f *class, _fcd name, int_f *name_len)
c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
if (c_name == NULL) goto DONE;
- c_class = (hid_t)*class;
+ c_class = (hid_t)*cls;
/*
* Call H5Punregister function.
*/
@@ -2695,19 +2694,19 @@ DONE:
/*----------------------------------------------------------------------------
* Name: h5pclose_class_c
* Purpose: Call H5Pclose_class to close property class
- * Inputs: class - identifier of property class to close
+ * Inputs: cls - identifier of property class to close
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* October 11, 2002
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pclose_class_c(hid_t_f *class)
+nh5pclose_class_c(hid_t_f *cls)
{
int_f ret_value = -1;
hid_t c_class;
- c_class = (hid_t)*class;
+ c_class = (hid_t)*cls;
/*
* Call H5Pclose_class function.
*/
@@ -2718,7 +2717,7 @@ nh5pclose_class_c(hid_t_f *class)
/*----------------------------------------------------------------------------
* Name: h5pget_class_name_c
* Purpose: Call H5Pget_class_name to get property class name
- * Inputs: class - identifier of property class
+ * Inputs: cls - identifier of property class
* name - ibuffer to retrieve name in
* name_len - length of the "name" buffer
* Returns: 0 on success, -1 on failure
@@ -2727,22 +2726,24 @@ nh5pclose_class_c(hid_t_f *class)
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pget_class_name_c(hid_t_f *class, _fcd name, int_f *name_len)
+nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
int_f ret_value = -1;
char *c_name = NULL; /* Buffer to hold C string */
size_t c_size;
c_size = (size_t)*name_len + 1;
+
/*
* Allocate buffer to hold name
*/
- if ((c_name = HDmalloc(c_size)) == NULL)
+ if(NULL == (c_name = (char *)HDmalloc(c_size)))
goto DONE;
+
/*
* Call H5Pget_class_name function.
*/
- c_name = H5Pget_class_name((hid_t)*class);
+ c_name = H5Pget_class_name((hid_t)*cls);
if(c_name == NULL) goto DONE;
HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
@@ -2752,6 +2753,7 @@ DONE:
HDfree(c_name);
return ret_value;
}
+
/*----------------------------------------------------------------------------
* Name: h5pset_c
* Purpose: Call h5setc_c to set property with the character string value
@@ -3092,14 +3094,11 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
if (tmp ==NULL) return ret_value;
tmp_p = tmp;
for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_name[i] = malloc((size_t)len[i] + 1);
- memcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
+ c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
+ HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
tmp_pp = c_memb_name[i];
tmp_pp[len[i]] = '\0';
tmp_p = tmp_p + c_lenmax;
-/* printf(" %d \n", len[i]);
- printf("name %s \n", c_memb_name[i]);
-*/
}
/*
* Take care of othe arguments
@@ -3108,25 +3107,22 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
c_prp_id = (hid_t)*prp_id;
for (i=0; i < H5FD_MEM_NTYPES; i++) {
c_memb_map[i] = (H5FD_mem_t)memb_map[i];
- /*printf("map %d \n", c_memb_map[i]); */
c_memb_fapl[i] = (hid_t)memb_fapl[i];
- /*printf("fapl %d \n", c_memb_fapl[i]); */
if(memb_addr[i] < 0) c_memb_addr[i] = HADDR_UNDEF;
- /* else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(HADDR_MAX));*/
else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr));
- /*printf("address %Ld \n", c_memb_addr[i]); */
}
/*
* Call H5Pset_fapl_multi function
*/
- status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, relax);
+ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax);
if ( status < 0 ) goto DONE;
ret_value = 0;
DONE:
- free(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++) free(c_memb_name[i]);
+ HDfree(tmp);
+ for (i=0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
return ret_value;
}
@@ -3203,9 +3199,9 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
/*
* Take care of names array
*/
- tmp = (char *)malloc(c_lenmax*H5FD_MEM_NTYPES + 1);
+ tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1);
tmp_p = tmp;
- memset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
+ HDmemset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
tmp[c_lenmax*H5FD_MEM_NTYPES] = '\0';
for (i=0; i < H5FD_MEM_NTYPES; i++) {
memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
@@ -3228,8 +3224,9 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));
*flag = (int_f)relax;
*maxlen_out = (int_f)length;
ret_value = 0;
- free(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++) free(c_memb_name[i]);
+ HDfree(tmp);
+ for (i=0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
return ret_value;
}
@@ -3326,10 +3323,10 @@ nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f
unsigned i;
int_f ret_value = -1;
- if(NULL == (c_name = (char *)malloc((size_t)*namelen + 1)))
+ if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)malloc(sizeof(unsigned int) * ((int)c_cd_nelmts_in))))
+ if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts_in))))
goto DONE;
/*
@@ -3385,7 +3382,7 @@ nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_
c_filter = (H5Z_filter_t)*filter;
c_flags = (unsigned)*flags;
c_cd_nelmts = (size_t)*cd_nelmts;
- c_cd_values = (unsigned int*)malloc(sizeof(unsigned int)*((int)c_cd_nelmts));
+ c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts));
if (!c_cd_values) return ret_value;
for (i = 0; i < c_cd_nelmts; i++)
c_cd_values[i] = (unsigned int)cd_values[i];
@@ -3977,7 +3974,7 @@ nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_l
* Allocate memory to store the expression.
*/
if(c_expression_len) {
- c_expression = (char*)HDmalloc(c_expression_len);
+ c_expression = (char *)HDmalloc(c_expression_len);
if(NULL == c_expression)
HGOTO_DONE(FAIL)
} /* end if */
@@ -4223,7 +4220,7 @@ nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_den
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size )
+nh5pset_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size)
{
int ret_value = -1;
#ifdef H5_HAVE_DIRECT
@@ -4257,7 +4254,7 @@ nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_siz
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size )
+nh5pget_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size)
{
int ret_value = -1;
#ifdef H5_HAVE_DIRECT
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index ba5d273..51a775f 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -16,6 +16,7 @@
/* This files contains C stubs for H5R Fortran APIs */
#include "H5f90.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5rcreate_object_c
@@ -27,39 +28,34 @@
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
+nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
{
- int ret_value = -1;
- hid_t c_loc_id;
- int ret_value_c;
- char *c_name;
- size_t c_namelen;
+ char *c_name = NULL;
hobj_ref_t ref_c;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
+ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
/*
* Call H5Rcreate function.
*/
- c_loc_id = *loc_id;
- ret_value_c = H5Rcreate(&ref_c, c_loc_id, c_name, H5R_OBJECT, -1);
+ if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, -1) < 0)
+ HGOTO_DONE(FAIL)
- HDfree(c_name);
- if (ret_value_c >= 0) {
- *ref=(haddr_t_f)ref_c;
- ret_value = 0;
- }
+ /* Copy the reference created */
+ *ref = (haddr_t_f)ref_c;
+done:
+ if(c_name)
+ HDfree(c_name);
return ret_value;
-}
+} /* nh5rcreate_object_c() */
/*----------------------------------------------------------------------------
* Name: h5rcreate_region_c
@@ -73,40 +69,34 @@ nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id)
+nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id)
{
- int ret_value = -1;
- hid_t c_loc_id;
- hid_t c_space_id;
- int ret_value_c;
- char *c_name;
- size_t c_namelen;
+ char *c_name = NULL;
hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
+ if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
/*
* Call H5Rcreate function.
*/
- c_loc_id = *loc_id;
- c_space_id = *space_id;
- ret_value_c = H5Rcreate(&ref_c, c_loc_id, c_name, H5R_DATASET_REGION, c_space_id);
-
- HDfree(c_name);
- if (ret_value_c >= 0) {
- HDmemcpy (ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
- ret_value = 0;
- }
+ if(H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0)
+ HGOTO_DONE(FAIL)
+
+ /* Copy the reference created */
+ HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
+
+done:
+ if(c_name)
+ HDfree(c_name);
return ret_value;
-}
+} /* end nh5rcreate_region_c() */
/*----------------------------------------------------------------------------
* Name: h5rdereference_region_c
@@ -117,29 +107,29 @@ nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
+nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
{
- int ret_value = -1;
- hid_t c_dset_id;
hdset_reg_ref_t ref_c;
hid_t c_obj_id;
+ int_f ret_value = 0;
- HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to dereference */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
/*
* Call H5Rdereference function.
*/
- c_dset_id = *dset_id;
- c_obj_id = H5Rdereference(c_dset_id, H5R_DATASET_REGION, &ref_c);
- if(c_obj_id < 0) return ret_value;
+ if((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /* Copy the object's ID */
*obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
- return ret_value;
-}
+done:
+ return ret_value;
+} /* end nh5rdereference_region_c() */
/*----------------------------------------------------------------------------
* Name: h5rdereference_object_c
@@ -150,28 +140,26 @@ nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id)
+nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id)
{
- int ret_value = -1;
- hid_t c_dset_id;
hid_t c_obj_id;
- hobj_ref_t ref_c;
-
- ref_c=*ref;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ int_f ret_value = 0;
/*
* Call H5Rdereference function.
*/
- c_dset_id = *dset_id;
- c_obj_id = H5Rdereference(c_dset_id, H5R_OBJECT, &ref_c);
- if(c_obj_id < 0) return ret_value;
+ if((c_obj_id = H5Rdereference((hid_t)*dset_id, H5R_OBJECT, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /* Copy the object's ID */
*obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
+
+done:
return ret_value;
-}
+} /* end nh5rdereference_object_c() */
/*----------------------------------------------------------------------------
* Name: h5rget_region_region_object_c
@@ -182,28 +170,29 @@ nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
+nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
{
- int ret_value = -1;
- hid_t c_dset_id;
hid_t c_space_id;
hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
- HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to dereference */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
/*
* Call H5Rget_region function.
*/
- c_dset_id = *dset_id;
- c_space_id = H5Rget_region(c_dset_id, H5R_DATASET_REGION, &ref_c);
- if(c_space_id < 0) return ret_value;
+ if((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
+
+ /* Copy the dataspace ID */
*space_id = (hid_t_f)c_space_id;
- ret_value = 0;
+
+done:
return ret_value;
-}
+} /* end nh5rget_region_region_c() */
/*----------------------------------------------------------------------------
* Name: h5rget_object_type_obj_c
@@ -215,29 +204,26 @@ nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, December 1, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
+nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
{
H5O_type_t c_obj_type;
- hobj_ref_t ref_c;
- int_f ret_value = -1;
-
- ref_c = *ref;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ int_f ret_value = 0;
/*
* Call H5Rget_object_type function.
*/
if(H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0)
- return ret_value;
+ HGOTO_DONE(FAIL)
+ /* Copy the object type */
*obj_type = (int_f)c_obj_type;
- ret_value = 0;
-
+done:
return ret_value;
-}
+} /* end nh5rget_object_type_obj_c() */
/*----------------------------------------------------------------------------
* Name: h5rget_name_object_c
@@ -252,42 +238,40 @@ nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
* Returns: 0 on success, -1 on failure
* Programmer: M.S. Breitenfeld
* March 31, 2008
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
+nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
{
- hobj_ref_t ref_c;
- int_f ret_value = -1;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
ssize_t c_size;
- size_t c_bufsize;
- char *c_buf= NULL; /* Buffer to hold C string */
+ size_t c_bufsize = (size_t)*name_len + 1;
+ char *c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
- ref_c = *ref;
- c_bufsize = (size_t)*name_len+1;
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc(c_bufsize)) == NULL)
- return ret_value;
-
+ if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL)
+
/*
* Call H5Rget_name function.
*/
- if((c_size=H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0)
- return ret_value;
+ if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0)
+ HGOTO_DONE(FAIL)
+
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1);
-
*size_default = (size_t_f)c_size;
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
+done:
+ if(c_buf)
+ HDfree(c_buf);
return ret_value;
-}
+} /* end nh5rget_name_object_c() */
/*----------------------------------------------------------------------------
* Name: h5rget_name_region_c
@@ -302,39 +286,40 @@ nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *nam
* Returns: 0 on success, -1 on failure
* Programmer: M.S. Breitenfeld
* March 31, 2008
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
+nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
{
hdset_reg_ref_t ref_c;
- int_f ret_value = -1;
ssize_t c_size;
- size_t c_bufsize;
- char *c_buf= NULL; /* Buffer to hold C string */
+ size_t c_bufsize = (size_t)*name_len + 1;
+ char *c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
- HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to query */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
- c_bufsize = (size_t)*name_len+1;
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc(c_bufsize)) == NULL)
- return ret_value;
+ if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL)
/*
* Call H5Rget_name function.
*/
- if((c_size=H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0)
- return ret_value;
+ if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0)
+ HGOTO_DONE(FAIL)
+
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1);
-
+ HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
*size_default = (size_t_f)c_size;
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
+done:
+ if(c_buf)
+ HDfree(c_buf);
return ret_value;
-}
+} /* end nh5rget_name_region_c() */
+
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index dea3ff0..e161618 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -989,7 +989,7 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi
c_space_id = *space_id;
rank = H5Sget_simple_extent_ndims(c_space_id);
- c_coord = malloc(sizeof(hsize_t)*rank*(*nelements));
+ c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank*(*nelements));
if(!c_coord) return ret_value;
for (i=0; i< *nelements; i++) {
for (j = 0; j < rank; j++) {
@@ -1080,7 +1080,7 @@ nh5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
/*
* Allocate buffer
*/
- if ((c_buf = HDmalloc(c_size)) == NULL)
+ if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
return ret_value;
/*
* Call H5Sencode function.
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 13fea93..37cfca0 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -990,7 +990,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n
char *c_name;
c_type_id = *type_id;
- c_index = *idx;
+ c_index = (unsigned)*idx;
c_name = H5Tget_member_name(c_type_id, c_index);
if (c_name == NULL ) return ret_value;
@@ -1199,7 +1199,7 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
/*----------------------------------------------------------------------------
* Name: h5tcreate_c
* Purpose: Call H5Tcreate to create a datatype
- * Inputs: class - class type
+ * Inputs: cls - class type
* size - size of the class memeber
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
@@ -1208,14 +1208,14 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
*---------------------------------------------------------------------------*/
int_f
-nh5tcreate_c(int_f *class, size_t_f *size, hid_t_f *type_id)
+nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
{
int ret_value = -1;
H5T_class_t c_class;
size_t c_size;
c_size =(size_t) *size;
- c_class = (H5T_class_t) *class;
+ c_class = (H5T_class_t) *cls;
*type_id = (hid_t_f)H5Tcreate(c_class, c_size);
if(*type_id < 0) return ret_value;
@@ -1419,7 +1419,7 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
int_f c_value;
c_value = *value;
c_namelen = ((size_t)*namelen) +1;
- c_name = (char *)malloc(sizeof(char)*c_namelen);
+ c_name = (char *)HDmalloc(sizeof(char)*c_namelen);
c_type_id = (hid_t)*type_id;
error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
@@ -1617,7 +1617,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
* datatype member
* Inputs: type_id - identifier of the dataspace
* member_no - member's index
- * Outputs: class - member's class
+ * Outputs: cls - member's class
* and negative on failure.
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
@@ -1626,7 +1626,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
*---------------------------------------------------------------------------*/
int_f
-nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *class )
+nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
{
int ret_value = 0;
hid_t c_type_id;
@@ -1638,7 +1638,7 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *class )
c_class = H5Tget_member_class(c_type_id, c_member_no);
if ( c_class == H5T_NO_CLASS ) ret_value = -1;
- *class = (int_f)c_class;
+ *cls = (int_f)c_class;
return ret_value;
}
@@ -1766,18 +1766,18 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
return ret_value;
}
- c_size = (size_t)*nalloc;
/*
* Allocate buffer
*/
- if ((c_buf = HDmalloc(c_size)) == NULL)
+ c_size = (size_t)*nalloc;
+ if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
return ret_value;
+
/*
* Call H5Tencode function.
*/
- if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0){
+ if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
return ret_value;
- }
/* copy the C buffer to the FORTRAN buffer.
* Can not use HD5packFstring because we don't want to
@@ -1788,7 +1788,8 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size);
ret_value = 0;
- if(c_buf) HDfree(c_buf);
+ if(c_buf)
+ HDfree(c_buf);
return ret_value;
}
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index e0748b5b..12c55af 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -36,7 +36,6 @@
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, August 3, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes )
@@ -254,7 +253,6 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, August 3, 1999
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
nh5close_types_c( hid_t_f * types, int_f *lentypes,
@@ -300,13 +298,6 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, August 3, 1999
- * Modifications: Added Z flags. EIP, March 12, 2003
- * Added more FD flags and new H5LIB flags
- * Added more FD flags for HDF5 file driver
- * EIP, April 9, 2005
- * Added Generic flags introduced in version 1.8
- * MSB, January, 2008
- * Added types in lines h5*_flags = ( )variable to match input
*---------------------------------------------------------------------------*/
int_f
nh5init_flags_c( int_f *h5d_flags, int_f *h5f_flags,
@@ -644,36 +635,34 @@ nh5init1_flags_c(int_f *h5lib_flags)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Friday, November 17, 2000
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5open_c()
+nh5open_c(void)
{
-
int ret_value = -1;
+
if (H5open() < 0) return ret_value;
ret_value = 0;
return ret_value;
}
+
/*---------------------------------------------------------------------------
* Name: h5close_c
* Purpose: Calls H5close call to close C HDF5 library
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Friday, November 17, 2000
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5close_c()
+nh5close_c(void)
{
-
int ret_value = -1;
+
if (H5close() < 0) return ret_value;
ret_value = 0;
return ret_value;
}
-
/*---------------------------------------------------------------------------
* Name: h5get_libversion_c
* Purpose: Calls H5get_libversion function
@@ -687,10 +676,9 @@ nh5close_c()
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, September 24, 2002
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5get_libversion_c( int_f *majnum, int_f *minnum, int_f *relnum)
+nh5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
{
int ret_value = -1;
@@ -705,7 +693,6 @@ nh5get_libversion_c( int_f *majnum, int_f *minnum, int_f *relnum)
return ret_value;
}
-
/*---------------------------------------------------------------------------
* Name: h5check_version_c
* Purpose: Calls H5check_version function
@@ -719,14 +706,13 @@ nh5get_libversion_c( int_f *majnum, int_f *minnum, int_f *relnum)
* Returns: 0 on success, aborts on failure
* Programmer: Elena Pourmal
* Tuesday, September 24, 2002
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5check_version_c( int_f *majnum, int_f *minnum, int_f *relnum)
+nh5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
{
-
int ret_value = -1;
unsigned c_majnum, c_minnum, c_relnum;
+
c_majnum = (unsigned) *majnum;
c_minnum = (unsigned) *minnum;
c_relnum = (unsigned) *relnum;
@@ -743,13 +729,12 @@ nh5check_version_c( int_f *majnum, int_f *minnum, int_f *relnum)
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, September 24, 2002
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5garbage_collect_c()
+nh5garbage_collect_c(void)
{
-
int ret_value = -1;
+
if (H5garbage_collect() < 0) return ret_value;
ret_value = 0;
return ret_value;
@@ -761,14 +746,14 @@ nh5garbage_collect_c()
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Tuesday, September 24, 2002
- * Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5dont_atexit_c()
+nh5dont_atexit_c(void)
{
-
int ret_value = -1;
+
if (H5dont_atexit() < 0) return ret_value;
ret_value = 0;
return ret_value;
}
+
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index 68bb169..a809229 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -51,15 +51,15 @@ HD5f2cstring(_fcd fdesc, size_t len)
/* Search for the end of the string */
str = _fcdtocp(fdesc);
- for(i=(int)len-1; i>=0 && !isgraph((int)str[i]); i--)
+ for(i = (int)len - 1; i >= 0 && !HDisgraph((int)str[i]); i--)
/*EMPTY*/;
/* Allocate C string */
- if ((cstr = HDmalloc( (size_t)(i + 2))) == NULL)
+ if(NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
return NULL;
/* Copy text from FORTRAN to C string */
- HDmemcpy(cstr,str,(size_t)(i+1));
+ HDmemcpy(cstr, str, (size_t)(i + 1));
/* Terminate C string */
cstr[i + 1] = '\0';
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 7f16359..3958e61 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -671,7 +671,7 @@ H5_FCDLL int_f nh5arename_c( hid_t_f *loc_id,
# define nh5tcompiler_conv_c H5_FC_FUNC_(h5tcompiler_conv_c, H5TCOMPILER_CONV_C)
# define nh5tget_native_type_c H5_FC_FUNC_(h5tget_native_type_c, H5TGET_NATIVE_TYPE_C)
-H5_FCDLL int_f nh5tcreate_c(int_f *class, size_t_f *size, hid_t_f *type_id);
+H5_FCDLL int_f nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id);
H5_FCDLL int_f nh5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id );
H5_FCDLL int_f nh5tcommit_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
H5_FCDLL int_f nh5tclose_c ( hid_t_f *type_id );
@@ -726,7 +726,7 @@ H5_FCDLL int_f nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims);
H5_FCDLL int_f nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id);
H5_FCDLL int_f nh5tvlen_create_c ( hid_t_f *type_id , hid_t_f *vltype_id);
H5_FCDLL int_f nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag );
-H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *class );
+H5_FCDLL int_f nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls );
H5_FCDLL int_f nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
H5_FCDLL int_f nh5tdecode_c ( _fcd buf, hid_t_f *obj_id );
H5_FCDLL int_f nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
@@ -908,7 +908,7 @@ H5_FCDLL int_f nh5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, s
# define nh5pset_chunk_cache_c H5_FC_FUNC_(h5pset_chunk_cache_c, H5PSET_CHUNK_CACHE_C)
# define nh5pget_chunk_cache_c H5_FC_FUNC_(h5pget_chunk_cache_c, H5PGET_CHUNK_CACHE_C)
-H5_FCDLL int_f nh5pcreate_c ( hid_t_f *class, hid_t_f *prp_id );
+H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id );
H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id );
H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id);
H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag);
@@ -990,12 +990,12 @@ H5_FCDLL int_f nh5pset_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f nh5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f nh5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f nh5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
-H5_FCDLL int_f nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *class);
-H5_FCDLL int_f nh5pregister_c(hid_t_f *class, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *class, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_real_c(hid_t_f *class, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregister_double_c(hid_t_f *class, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f nh5pregisterc_c(hid_t_f *class, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len);
+H5_FCDLL int_f nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls);
+H5_FCDLL int_f nh5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
+H5_FCDLL int_f nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, _fcd value, int_f *value_len);
H5_FCDLL int_f nh5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
H5_FCDLL int_f nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
H5_FCDLL int_f nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
@@ -1018,8 +1018,8 @@ H5_FCDLL int_f nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id);
H5_FCDLL int_f nh5pisa_class_c(hid_t_f *plist, hid_t_f *pclass);
H5_FCDLL int_f nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len);
H5_FCDLL int_f nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len);
-H5_FCDLL int_f nh5punregister_c(hid_t_f *class, _fcd name, int_f *name_len);
-H5_FCDLL int_f nh5pclose_class_c(hid_t_f * class);
+H5_FCDLL int_f nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len);
+H5_FCDLL int_f nh5pclose_class_c(hid_t_f * cls);
H5_FCDLL int_f nh5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len);
H5_FCDLL int_f nh5pset_shuffle_c ( hid_t_f *prp_id);
H5_FCDLL int_f nh5pset_fletcher32_c ( hid_t_f *prp_id );
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index cbb002b..c5a16bc 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -209,6 +209,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -270,6 +271,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -326,6 +328,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
@@ -436,7 +439,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 66
+LT_VERS_REVISION = 70
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index a536c2e..3c905e7 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -30,6 +30,7 @@ ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_C_TEST_LIB_TARGET}
)
+SET (SHARED_LINK_FLAGS " ")
IF (WIN32 AND NOT CYGWIN)
IF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
@@ -37,11 +38,7 @@ IF (WIN32 AND NOT CYGWIN)
BUILD_HDF5_DLL
)
IF (MSVC)
- SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET}
- PROPERTIES
- COMPILE_FLAGS "/dll"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL"
- )
+ SET (SHARED_LINK_FLAGS "/DLL")
ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET}
@@ -49,6 +46,7 @@ IF (WIN32 AND NOT CYGWIN)
HDF5F90_WINDOWS
)
ENDIF (WIN32 AND NOT CYGWIN)
+TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${SHARED_LINK_FLAGS})
SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran)
TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE})
@@ -74,8 +72,8 @@ ADD_EXECUTABLE (testhdf5_fortran
tH5VL.f90
tH5Z.f90
)
-H5_NAMING (testhdf5_fortran)
-TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran)
+H5_NAMING (testhdf5_fortran ${LIB_TYPE})
+TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran "")
TARGET_LINK_LIBRARIES (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -96,8 +94,8 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8
tH5A_1_8.f90
tH5G_1_8.f90
)
-H5_NAMING (testhdf5_fortran_1_8)
-TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8)
+H5_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE})
+TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8 "")
TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
@@ -112,8 +110,8 @@ ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
#-- Adding test for fflush1
ADD_EXECUTABLE (fflush1 fflush1.f90)
-H5_NAMING (fflush1)
-TARGET_FORTRAN_WIN_PROPERTIES (fflush1)
+H5_NAMING (fflush1 ${LIB_TYPE})
+TARGET_FORTRAN_WIN_PROPERTIES (fflush1 "")
TARGET_LINK_LIBRARIES (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
@@ -128,8 +126,8 @@ ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
#-- Adding test for fflush2
ADD_EXECUTABLE (fflush2 fflush2.f90)
-H5_NAMING (fflush2)
-TARGET_FORTRAN_WIN_PROPERTIES (fflush2)
+H5_NAMING (fflush2 ${LIB_TYPE})
+TARGET_FORTRAN_WIN_PROPERTIES (fflush2 "")
TARGET_LINK_LIBRARIES (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 4c0b03f..6fdfdf4 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -190,6 +190,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -251,6 +252,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -307,6 +309,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90
index 223877c..c48420e 100644
--- a/fortran/test/tH5A_1_8.f90
+++ b/fortran/test/tH5A_1_8.f90
@@ -158,13 +158,13 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error)
!!$ CALL test_attr_corder_transition(my_fcpl, my_fapl)
!!$ CALL test_attr_corder_delete(my_fcpl, my_fapl)
ret_total_error = 0
- CALL test_attr_info_by_idx(new_format, my_fcpl, my_fapl, ret_total_error)
+ CALL test_attr_info_by_idx(new_format(i), my_fcpl, my_fapl, ret_total_error)
CALL write_test_status(ret_total_error, &
' - Testing querying attribute info by index', &
total_error)
ret_total_error = 0
- CALL test_attr_delete_by_idx(new_format, my_fcpl, my_fapl, ret_total_error)
+ CALL test_attr_delete_by_idx(new_format(i), my_fcpl, my_fapl, ret_total_error)
CALL write_test_status(ret_total_error, &
' - Testing deleting attribute by index', &
total_error)
@@ -718,7 +718,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error)
CALL check("h5aclose_f",error,total_error)
! /* Verify information for NEW attribute */
- CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index, total_error)
+ CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index(i), total_error)
! CALL check("FAILED IN attr_info_by_idx_check",total_error)
ENDDO
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index edabb35..9cfbae5 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -21,8 +21,8 @@ ADD_EXECUTABLE (parallel_test
hyper.f90
mdset.f90
)
-H5_NAMING (parallel_test)
-TARGET_FORTRAN_WIN_PROPERTIES (parallel_test)
+H5_NAMING (parallel_test ${LIB_TYPE})
+TARGET_FORTRAN_WIN_PROPERTIES (parallel_test "")
TARGET_LINK_LIBRARIES (parallel_test
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index f2e70b4..e592160 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -143,6 +143,7 @@ DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
DIRECT_VFD = @DIRECT_VFD@
+DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DYNAMIC_DIRS = @DYNAMIC_DIRS@
@@ -204,6 +205,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_STATIC_EXEC = @LT_STATIC_EXEC@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
MPI_GET_SIZE = @MPI_GET_SIZE@
@@ -260,6 +262,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@