summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt45
-rw-r--r--src/H5A.c2
-rw-r--r--src/H5Adeprec.c4
-rw-r--r--src/H5Apkg.h15
-rw-r--r--src/H5Apublic.h16
-rw-r--r--src/H5D.c6
-rw-r--r--src/H5Dio.c4
-rw-r--r--src/H5Dpkg.h9
-rw-r--r--src/H5Dpublic.h10
-rw-r--r--src/H5F.c48
-rw-r--r--src/H5Fdeprec.c4
-rw-r--r--src/H5Fint.c2
-rw-r--r--src/H5Fpkg.h29
-rw-r--r--src/H5Fpublic.h29
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gpkg.h16
-rw-r--r--src/H5Gpublic.h16
-rw-r--r--src/H5O.c14
-rw-r--r--src/H5Odeprec.c6
-rw-r--r--src/H5Oprivate.h7
-rw-r--r--src/H5Opublic.h7
-rw-r--r--src/H5PLint.c2
-rw-r--r--src/H5PLpath.c10
-rw-r--r--src/H5PLpkg.h2
-rw-r--r--src/H5PLplugin_cache.c2
-rw-r--r--src/H5Tcommit.c4
-rw-r--r--src/H5VLcallback.c100
-rw-r--r--src/H5VLint.c9
-rw-r--r--src/H5VLnative.c466
-rw-r--r--src/H5VLpassthru.c677
-rw-r--r--src/H5private.h6
-rw-r--r--src/H5system.c59
-rw-r--r--src/H5trace.c180
-rw-r--r--src/H5win32defs.h8
34 files changed, 965 insertions, 859 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cd81ba5..778505f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -950,10 +950,13 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
COMMAND ${HDF5_BATCH_CMD}
ARGS ${HDF5_BINARY_DIR}/${HDF5_BATCH_H5DETECT_SCRIPT}
COMMAND ${CMAKE_COMMAND}
ARGS -E echo "Executed batch command to create H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
@@ -963,31 +966,62 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c)
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
DEPENDS gen_H5Tinit ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit_created
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
else ()
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5detect>
ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
DEPENDS H5detect
WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c
+ ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
)
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
endif ()
endif ()
set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c PROPERTIES GENERATED TRUE)
+else ()
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c" "${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1
+ DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c
+ WORKING_DIRECTORY ${HDF5_GENERATED_SOURCE_DIR}
+ )
+ set_source_files_properties (${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c PROPERTIES GENERATED TRUE)
+ endif ()
endif ()
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
@@ -1001,8 +1035,11 @@ target_link_libraries (H5make_libsettings
add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
+ ${HDF5_BINARY_DIR}/gen_SRCS.stamp2
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$<TARGET_FILE:H5make_libsettings>
ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2
DEPENDS H5make_libsettings
WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
@@ -1010,9 +1047,13 @@ set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c PROPERTIES GENE
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/shared/H5lib_settings.c
+ ${HDF5_BINARY_DIR}/shared/shared_gen_SRCS.stamp2
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_BINARY_DIR}/H5lib_settings.c" "${HDF5_BINARY_DIR}/shared/H5lib_settings.c"
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E touch ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2
DEPENDS ${HDF5_BINARY_DIR}/H5lib_settings.c
+ WORKING_DIRECTORY ${HDF5_BINARY_DIR}
)
set_source_files_properties (${HDF5_BINARY_DIR}/shared/H5lib_settings.c PROPERTIES GENERATED TRUE)
endif ()
@@ -1025,8 +1066,8 @@ option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
# Add H5Tinit source to build - generated by H5detect/CMake at configure time
#-----------------------------------------------------------------------------
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
+add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2)
-add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${gen_SRCS})
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -1055,8 +1096,8 @@ set (install_targets ${HDF5_LIB_TARGET})
if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
+ add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2)
- add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${shared_gen_SRCS})
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
diff --git a/src/H5A.c b/src/H5A.c
index 0d20912..74b0148 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1046,6 +1046,8 @@ H5Aget_info(hid_t attr_id, H5A_info_t *ainfo)
/* Check arguments */
if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(attr_id, H5I_ATTR)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute")
+ if(!ainfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "attribute_info parameter cannot be NULL")
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(attr_id);
diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c
index b43e41d..d4eac6a 100644
--- a/src/H5Adeprec.c
+++ b/src/H5Adeprec.c
@@ -343,7 +343,7 @@ H5Aget_num_attrs(hid_t loc_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
/* Get the number of attributes for the object */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, &oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, &oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, (-1), "unable to get attribute count for object")
H5_CHECKED_ASSIGN(ret_value, int, oinfo.num_attrs, hsize_t);
@@ -408,7 +408,7 @@ H5Aiterate1(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data)
HGOTO_ERROR(H5E_VOL, H5E_BADTYPE, H5_ITER_ERROR, "invalid location identifier")
/* Call attribute iteration routine */
- if((ret_value = H5VL_attr_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_ATTR_ITERATE_OLD, loc_id, attr_num, op, op_data)) < 0)
+ if((ret_value = H5VL_attr_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_ATTR_ITERATE_OLD, loc_id, attr_num, op, op_data)) < 0)
HERROR(H5E_VOL, H5E_BADITER, "error iterating over attributes");
done:
diff --git a/src/H5Apkg.h b/src/H5Apkg.h
index cfe9dae..91061cd 100644
--- a/src/H5Apkg.h
+++ b/src/H5Apkg.h
@@ -155,21 +155,6 @@ typedef struct {
H5A_t **attrs; /* Pointer to array of attribute pointers */
} H5A_attr_table_t;
-/* Types for optional attribute VOL operations */
-typedef enum H5VL_attr_optional_t {
- H5VL_ATTR_ITERATE_OLD /* H5Aiterate (deprecated routine) */
- /* (This enum value should have an
- * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
- * around it, but the compiler
- * complains about an empty enum
- * when deprecated symbols are
- * disabled currently. When
- * another enum value is added,
- * please put the #ifdef around
- * this symbol. QAK - 2018/12/06
- */
-} H5VL_attr_optional_t;
-
/*****************************/
/* Package Private Variables */
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index 586940b..726f51b 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -38,6 +38,22 @@ typedef struct {
typedef herr_t (*H5A_operator2_t)(hid_t location_id/*in*/,
const char *attr_name/*in*/, const H5A_info_t *ainfo/*in*/, void *op_data/*in,out*/);
+/* Enumeration for native VOL connector attribute optional VOL operations */
+typedef enum H5VL_native_attr_optional_t {
+ H5VL_NATIVE_ATTR_ITERATE_OLD /* H5Aiterate (deprecated routine) */
+ /* (This enum value should have an
+ * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
+ * around it, but the compiler
+ * complains about an empty enum
+ * when deprecated symbols are
+ * disabled currently. When
+ * another enum value is added,
+ * please put the #ifdef around
+ * this symbol. QAK - 2018/12/06
+ */
+} H5VL_native_attr_optional_t;
+
+
/* Public function prototypes */
H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id,
hid_t space_id, hid_t acpl_id, hid_t aapl_id);
diff --git a/src/H5D.c b/src/H5D.c
index 1e16868..db70847 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1027,7 +1027,7 @@ H5Dformat_convert(hid_t dset_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set collective metadata read info")
/* Convert the dataset */
- if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_FORMAT_CONVERT) < 0)
+ if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_FORMAT_CONVERT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_INTERNAL, FAIL, "can't convert dataset format")
done:
@@ -1063,7 +1063,7 @@ H5Dget_chunk_index_type(hid_t dset_id, H5D_chunk_index_t *idx_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "idx_type parameter cannot be NULL")
/* Get the chunk indexing type */
- if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_GET_CHUNK_INDEX_TYPE, idx_type) < 0)
+ if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE, idx_type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk index type")
done:
@@ -1104,7 +1104,7 @@ H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_n
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "chunk_nbytes parameter cannot be NULL")
/* Get the dataset creation property list */
- if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_DATASET_GET_CHUNK_STORAGE_SIZE, offset, chunk_nbytes) < 0)
+ if(H5VL_dataset_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE, offset, chunk_nbytes) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get storage size of chunk")
done:
diff --git a/src/H5Dio.c b/src/H5Dio.c
index f977b0e..037d443 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -242,7 +242,7 @@ H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fil
H5CX_set_dxpl(dxpl_id);
/* Read the raw chunk */
- if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_DATASET_CHUNK_READ, offset, filters, buf) < 0)
+ if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_CHUNK_READ, offset, filters, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read unprocessed chunk data")
done:
@@ -370,7 +370,7 @@ H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *of
H5CX_set_dxpl(dxpl_id);
/* Write chunk */
- if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_DATASET_CHUNK_WRITE, filters, offset, data_size_32, buf) < 0)
+ if(H5VL_dataset_optional(vol_obj, dxpl_id, H5_REQUEST_NULL, H5VL_NATIVE_DATASET_CHUNK_WRITE, filters, offset, data_size_32, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write unprocessed chunk data")
done:
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 30652a5..2767aa1 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -110,15 +110,6 @@ typedef struct H5D_type_info_t {
hbool_t bkg_buf_allocated; /* Whether the background buffer was allocated */
} H5D_type_info_t;
-/* Types for dataset optional VOL operations */
-typedef enum H5VL_dataset_optional_t {
- H5VL_DATASET_FORMAT_CONVERT, /* H5Dformat_convert (internal) */
- H5VL_DATASET_GET_CHUNK_INDEX_TYPE, /* H5Dget_chunk_index_type */
- H5VL_DATASET_GET_CHUNK_STORAGE_SIZE, /* H5Dget_chunk_storage_size */
- H5VL_DATASET_CHUNK_READ, /* H5Dchunk_read */
- H5VL_DATASET_CHUNK_WRITE, /* H5Dchunk_write */
-} H5VL_dataset_optional_t;
-
/* Forward declaration of structs used below */
struct H5D_io_info_t;
struct H5D_chunk_map_t;
diff --git a/src/H5Dpublic.h b/src/H5Dpublic.h
index a1ccda0..921974d 100644
--- a/src/H5Dpublic.h
+++ b/src/H5Dpublic.h
@@ -104,6 +104,16 @@ typedef enum H5D_vds_view_t {
/* Callback for H5Pset_append_flush() in a dataset access property list */
typedef herr_t (*H5D_append_cb_t)(hid_t dataset_id, hsize_t *cur_dims, void *op_data);
+/* Enumeration for native VOL connector dataset optional VOL operations */
+typedef enum H5VL_native_dataset_optional_t {
+ H5VL_NATIVE_DATASET_FORMAT_CONVERT, /* H5Dformat_convert (internal) */
+ H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE, /* H5Dget_chunk_index_type */
+ H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE, /* H5Dget_chunk_storage_size */
+ H5VL_NATIVE_DATASET_CHUNK_READ, /* H5Dchunk_read */
+ H5VL_NATIVE_DATASET_CHUNK_WRITE, /* H5Dchunk_write */
+} H5VL_native_dataset_optional_t;
+
+
/********************/
/* Public Variables */
/********************/
diff --git a/src/H5F.c b/src/H5F.c
index a5017d8..3937609 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -545,7 +545,7 @@ H5Fget_vfd_handle(hid_t file_id, hid_t fapl_id, void **file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Retrieve the VFD handle for the file */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_VFD_HANDLE, file_handle, fapl_id) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_VFD_HANDLE, file_handle, fapl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get VFD handle")
done:
@@ -931,7 +931,7 @@ H5Fget_freespace(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid file identifier")
/* Get the amount of free space in the file */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FREE_SPACE, &ret_value) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SPACE, &ret_value) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free space")
done:
@@ -966,7 +966,7 @@ H5Fget_filesize(hid_t file_id, hsize_t *size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Get the file size */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_SIZE, size) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_SIZE, size) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
done:
@@ -1027,7 +1027,7 @@ H5Fget_file_image(hid_t file_id, void *buf_ptr, size_t buf_len)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "not a file ID")
/* Get the file image */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FILE_IMAGE, buf_ptr, &ret_value, buf_len) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_IMAGE, buf_ptr, &ret_value, buf_len) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file image")
done:
@@ -1067,7 +1067,7 @@ H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Get the metadata cache configuration */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_CONF, config_ptr) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_CONF, config_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get metadata cache configuration")
done:
@@ -1100,7 +1100,7 @@ H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t *config_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Set the metadata cache configuration */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_MDC_CONFIG, config_ptr) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_MDC_CONFIG, config_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set metadata cache configuration")
done:
@@ -1136,7 +1136,7 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Get the current hit rate */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_HR, hit_rate_ptr) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_HR, hit_rate_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC hit rate")
done:
@@ -1173,7 +1173,7 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Get the size data */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_SIZE, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_SIZE, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get MDC size")
done:
@@ -1211,7 +1211,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Reset the hit rate statistic */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_RESET_MDC_HIT_RATE) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset cache hit rate")
done:
@@ -1305,7 +1305,7 @@ H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Get the file information */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_INFO, type, finfo) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, type, finfo) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info")
done:
@@ -1341,7 +1341,7 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Get the retry info */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_METADATA_READ_RETRY_INFO, info) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO, info) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't get metadata read retry info")
done:
@@ -1380,7 +1380,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "nsects must be > 0")
/* Get the free-space section information in the file */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, type, nsects) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FREE_SECTIONS, sect_info, &ret_value, type, nsects) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "unable to get file free sections")
done:
@@ -1413,7 +1413,7 @@ H5Fclear_elink_file_cache(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Release the EFC */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_CLEAR_ELINK_CACHE) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release external file cache")
done:
@@ -1473,7 +1473,7 @@ H5Fstart_swmr_write(hid_t file_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
/* Start SWMR writing */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_START_SWMR_WRITE) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_START_SWMR_WRITE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_SYSTEM, FAIL, "unable to start SWMR writing")
done:
@@ -1505,7 +1505,7 @@ H5Fstart_mdc_logging(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Call mdc logging function */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_START_MDC_LOGGING) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_START_MDC_LOGGING) < 0)
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to start mdc logging")
done:
@@ -1538,7 +1538,7 @@ H5Fstop_mdc_logging(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Call mdc logging function */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_STOP_MDC_LOGGING) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_STOP_MDC_LOGGING) < 0)
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to stop mdc logging")
done:
@@ -1572,7 +1572,7 @@ H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Call mdc logging function */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_LOGGING_STATUS, is_enabled, is_currently_logging) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS, is_enabled, is_currently_logging) < 0)
HGOTO_ERROR(H5E_FILE, H5E_LOGFAIL, FAIL, "unable to get logging status")
done:
@@ -1610,7 +1610,7 @@ H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
/* Set the library's version bounds */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds")
done:
@@ -1647,7 +1647,7 @@ H5Fformat_convert(hid_t file_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
/* Convert the format */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_FORMAT_CONVERT) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_FORMAT_CONVERT) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "can't convert file format")
done:
@@ -1678,7 +1678,7 @@ H5Freset_page_buffering_stats(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid file identifier")
/* Reset the statistics */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_RESET_PAGE_BUFFERING_STATS) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't reset stats for page buffering")
done:
@@ -1713,7 +1713,7 @@ H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], unsigned hits[2
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL input parameters for stats")
/* Get the statistics */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_PAGE_BUFFERING_STATS, accesses, hits, misses, evictions, bypasses) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS, accesses, hits, misses, evictions, bypasses) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve stats for page buffering")
done:
@@ -1748,7 +1748,7 @@ H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_len)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Go get the address and size of the cache image */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_IMAGE_INFO, image_addr, image_len) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO, image_addr, image_len) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info")
done:
@@ -1782,7 +1782,7 @@ H5Fget_eoa(hid_t file_id, haddr_t *eoa)
/* Only do work if valid pointer to fill in */
if(eoa) {
/* Retrieve the EOA for the file */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_EOA, eoa) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_EOA, eoa) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get EOA")
} /* end if */
@@ -1813,7 +1813,7 @@ H5Fincrement_filesize(hid_t file_id, hsize_t increment)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Increment the file size */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_INCR_FILESIZE, increment) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_INCR_FILESIZE, increment) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to increment file size")
done:
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
index dfc1441..1a2418d 100644
--- a/src/H5Fdeprec.c
+++ b/src/H5Fdeprec.c
@@ -118,7 +118,7 @@ H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Get the file information */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_INFO, type, &finfo2) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_INFO, type, &finfo2) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve file info")
/* Copy the compatible fields into the older struct */
@@ -225,7 +225,7 @@ H5Fset_latest_format(hid_t file_id, hbool_t latest_format)
low = H5F_LIBVER_EARLIEST;
/* Set the library's version bounds */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS, low, high) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set library version bounds")
done:
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 4ac74ad..993db06 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -3693,7 +3693,7 @@ H5F_get_file_id(hid_t obj_id, H5I_type_t type)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid identifier")
/* Get the file through the VOL */
- if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FILE_ID, type, &file_id) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_FILE_GET_FILE_ID, type, &file_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get file ID")
if(H5I_INVALID_HID == file_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get the file ID through the VOL")
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index fc902b0..e5bb28f 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -382,35 +382,6 @@ struct H5F_t {
#endif /* H5_HAVE_PARALLEL */
};
-/* types for file optional VOL operations */
-typedef enum H5VL_file_optional_t {
- H5VL_FILE_CLEAR_ELINK_CACHE, /* Clear external link cache */
- H5VL_FILE_GET_FILE_IMAGE, /* file image */
- H5VL_FILE_GET_FREE_SECTIONS, /* file free selections */
- H5VL_FILE_GET_FREE_SPACE, /* file freespace */
- H5VL_FILE_GET_INFO, /* file info */
- H5VL_FILE_GET_MDC_CONF, /* file metadata cache configuration */
- H5VL_FILE_GET_MDC_HR, /* file metadata cache hit rate */
- H5VL_FILE_GET_MDC_SIZE, /* file metadata cache size */
- H5VL_FILE_GET_SIZE, /* file size */
- H5VL_FILE_GET_VFD_HANDLE, /* file VFD handle */
- H5VL_FILE_GET_FILE_ID, /* retrieve or resurrect file ID of object */
- H5VL_FILE_RESET_MDC_HIT_RATE, /* get metadata cache hit rate */
- H5VL_FILE_SET_MDC_CONFIG, /* set metadata cache configuration */
- H5VL_FILE_GET_METADATA_READ_RETRY_INFO,
- H5VL_FILE_START_SWMR_WRITE,
- H5VL_FILE_START_MDC_LOGGING,
- H5VL_FILE_STOP_MDC_LOGGING,
- H5VL_FILE_GET_MDC_LOGGING_STATUS,
- H5VL_FILE_FORMAT_CONVERT,
- H5VL_FILE_RESET_PAGE_BUFFERING_STATS,
- H5VL_FILE_GET_PAGE_BUFFERING_STATS,
- H5VL_FILE_GET_MDC_IMAGE_INFO,
- H5VL_FILE_GET_EOA,
- H5VL_FILE_INCR_FILESIZE,
- H5VL_FILE_SET_LIBVER_BOUNDS
-} H5VL_file_optional_t;
-
/*****************************/
/* Package Private Variables */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 8e54e7f..ec543b6 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -217,6 +217,35 @@ typedef struct H5F_retry_info_t {
/* Callback for H5Pset_object_flush_cb() in a file access property list */
typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
+/* Enumeration for native VOL connector file optional VOL operations */
+typedef enum H5VL_native_file_optional_t {
+ H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE, /* H5Fclear_elink_file_cache */
+ H5VL_NATIVE_FILE_GET_FILE_IMAGE, /* H5Fget_file_image */
+ H5VL_NATIVE_FILE_GET_FREE_SECTIONS, /* H5Fget_free_sections */
+ H5VL_NATIVE_FILE_GET_FREE_SPACE, /* H5Fget_freespace */
+ H5VL_NATIVE_FILE_GET_INFO, /* H5Fget_info1/2 */
+ H5VL_NATIVE_FILE_GET_MDC_CONF, /* H5Fget_mdc_config */
+ H5VL_NATIVE_FILE_GET_MDC_HR, /* H5Fget_mdc_hit_rate */
+ H5VL_NATIVE_FILE_GET_MDC_SIZE, /* H5Fget_mdc_size */
+ H5VL_NATIVE_FILE_GET_SIZE, /* H5Fget_filesize */
+ H5VL_NATIVE_FILE_GET_VFD_HANDLE, /* H5Fget_vfd_handle */
+ H5VL_NATIVE_FILE_GET_FILE_ID, /* H5Fget_file_id */
+ H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE, /* H5Freset_mdc_hit_rate_stats */
+ H5VL_NATIVE_FILE_SET_MDC_CONFIG, /* H5Fset_mdc_config */
+ H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO, /* H5Fget_metadata_read_retry_info */
+ H5VL_NATIVE_FILE_START_SWMR_WRITE, /* H5Fstart_swmr_write */
+ H5VL_NATIVE_FILE_START_MDC_LOGGING, /* H5Fstart_mdc_logging */
+ H5VL_NATIVE_FILE_STOP_MDC_LOGGING, /* H5Fstop_mdc_logging */
+ H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS, /* H5Fget_mdc_logging_status */
+ H5VL_NATIVE_FILE_FORMAT_CONVERT, /* H5Fformat_convert */
+ H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS, /* H5Freset_page_buffering_stats */
+ H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS, /* H5Fget_page_buffering_stats */
+ H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO, /* H5Fget_mdc_image_info */
+ H5VL_NATIVE_FILE_GET_EOA, /* H5Fget_eoa */
+ H5VL_NATIVE_FILE_INCR_FILESIZE, /* H5Fincrement_filesize */
+ H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS /* H5Fset_latest_format/libver_bounds */
+} H5VL_native_file_optional_t;
+
#ifdef __cplusplus
extern "C" {
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index a15703e..07cad55 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -734,7 +734,7 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Set the comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value")
done:
@@ -795,7 +795,7 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Get the comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, buf, bufsize, &ret_value) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, buf, bufsize, &ret_value) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get comment value")
done:
@@ -868,7 +868,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op,
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, (-1), "invalid identifier")
/* Call private iteration function, through VOL callback */
- if((ret_value = H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_GROUP_ITERATE_OLD, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
+ if((ret_value = H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_ITERATE_OLD, &loc_params, idx, &last_obj, &lnk_op, op_data)) < 0)
HERROR(H5E_SYM, H5E_BADITER, "error iterating over group's links");
/* Set the index we stopped at */
@@ -985,7 +985,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_GROUP_GET_OBJINFO, &loc_params, (unsigned)follow_link, statbuf) < 0)
+ if(H5VL_group_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_GROUP_GET_OBJINFO, &loc_params, (unsigned)follow_link, statbuf) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
} /* end if */
@@ -1239,7 +1239,7 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx)
/* Retrieve the object's basic information (which includes its type) */
fields = H5O_INFO_BASIC;
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, &oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, &oinfo, fields) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object info")
/* Map to group object type */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 159b6f5..f475bde 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -299,22 +299,6 @@ typedef struct H5G_copy_file_ud_t {
H5G_cache_t cache; /* Cached data for symbol table entry */
} H5G_copy_file_ud_t;
-/* Types for optional group VOL operations */
-typedef enum H5VL_group_optional_t {
- H5VL_GROUP_ITERATE_OLD, /* HG5Giterate (deprecated routine) */
- H5VL_GROUP_GET_OBJINFO /* HG5Gget_objinfo (deprecated routine) */
- /* (These two enum values should have an
- * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
- * around them, but the compiler
- * complains about an empty enum
- * when deprecated symbols are
- * disabled currently. When
- * another enum value is added,
- * please put the #ifdef around
- * these symbols. QAK - 2018/12/06
- */
-} H5VL_group_optional_t;
-
/*****************************/
/* Package Private Variables */
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index ab6f200..58961ba 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -62,6 +62,22 @@ typedef struct H5G_info_t {
hbool_t mounted; /* Whether group has a file mounted on it */
} H5G_info_t;
+/* Enumeration for native VOL connector group optional VOL operations */
+typedef enum H5VL_native_group_optional_t {
+ H5VL_NATIVE_GROUP_ITERATE_OLD, /* HG5Giterate (deprecated routine) */
+ H5VL_NATIVE_GROUP_GET_OBJINFO /* HG5Gget_objinfo (deprecated routine) */
+ /* (These two enum values should have an
+ * "#ifndefH5_NO_DEPRECATED_SYMBOLS"
+ * around them, but the compiler
+ * complains about an empty enum
+ * when deprecated symbols are
+ * disabled currently. When
+ * another enum value is added,
+ * please put the #ifdef around
+ * these symbols. QAK - 2018/12/06
+ */
+} H5VL_native_group_optional_t;
+
/********************/
/* Public Variables */
/********************/
diff --git a/src/H5O.c b/src/H5O.c
index 0212dc4..ea88172 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -575,7 +575,7 @@ H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
@@ -633,7 +633,7 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
done:
@@ -698,7 +698,7 @@ H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, fields) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
@@ -746,7 +746,7 @@ H5Oset_comment(hid_t obj_id, const char *comment)
loc_params.obj_type = H5I_get_type(obj_id);
/* (Re)set the object's comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object")
done:
@@ -801,7 +801,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* (Re)set the object's comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_SET_COMMENT, &loc_params, comment) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name)
done:
@@ -844,7 +844,7 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize)
loc_params.obj_type = H5I_get_type(obj_id);
/* Retrieve the object's comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object")
done:
@@ -898,7 +898,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "invalid location identifier")
/* Retrieve the object's comment */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_COMMENT, &loc_params, comment, bufsize, &ret_value) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, (-1), "can't get comment for object: '%s'", name)
done:
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 93fc18a..56b0c05 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -109,7 +109,7 @@ H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
@@ -160,7 +160,7 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t la
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name)
done:
@@ -221,7 +221,7 @@ H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
/* Retrieve the object's information */
- if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
+ if(H5VL_object_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_NATIVE_OBJECT_GET_INFO, &loc_params, oinfo, H5O_INFO_ALL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object")
done:
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index e8565b9..7ed9e26 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -851,13 +851,6 @@ typedef struct {
} u;
} H5O_mesg_operator_t;
-/* Types for object optional VOL operations */
-typedef enum H5VL_object_optional_t {
- H5VL_OBJECT_GET_COMMENT, /* get object comment */
- H5VL_OBJECT_GET_INFO, /* get object info */
- H5VL_OBJECT_SET_COMMENT /* set object comment */
-} H5VL_object_optional_t;
-
/* Typedef for abstract object creation */
typedef struct {
H5O_type_t obj_type; /* Type of object to create */
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index da2910d..fe0c72d 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -150,6 +150,13 @@ typedef enum H5O_mcdt_search_ret_t {
/* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */
typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data);
+/* Enumeration for native VOL connector object optional VOL operations */
+typedef enum H5VL_native_object_optional_t {
+ H5VL_NATIVE_OBJECT_GET_COMMENT, /* H5G|H5Oget_comment, H5Oget_comment_by_name */
+ H5VL_NATIVE_OBJECT_GET_INFO, /* H5Oget_info(_by_idx, _by_name)(2?) */
+ H5VL_NATIVE_OBJECT_SET_COMMENT /* H5G|H5Oset_comment, H5Oset_comment_by_name */
+} H5VL_native_object_optional_t;
+
/********************/
/* Public Variables */
/********************/
diff --git a/src/H5PLint.c b/src/H5PLint.c
index bbe71fe..ded315a 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -262,7 +262,7 @@ H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
/* Set up the search parameters */
search_params.type = type;
- search_params.key.id = key->id;
+ search_params.key = key;
/* Search in the table of already loaded plugin libraries */
if(H5PL__find_plugin_in_cache(&search_params, &found, &plugin_info) < 0)
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index d53007b..04248b5 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -242,6 +242,7 @@ H5PL__create_path_table(void)
* environment variable or the default.
*/
char *next_path = NULL; /* A path tokenized from the paths string */
+ char *lasts = NULL; /* Context pointer for strtok_r() call */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -265,8 +266,7 @@ H5PL__create_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path copy")
/* Separate the paths and store them */
- /* XXX: strtok() is not thread-safe */
- next_path = HDstrtok(paths, H5PL_PATH_SEPARATOR);
+ next_path = HDstrtok_r(paths, H5PL_PATH_SEPARATOR, &lasts);
while (next_path) {
/* Insert the path into the table */
@@ -274,7 +274,7 @@ H5PL__create_path_table(void)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't insert path: %s", next_path)
/* Get the next path from the environment string */
- next_path = HDstrtok(NULL, H5PL_PATH_SEPARATOR);
+ next_path = HDstrtok_r(NULL, H5PL_PATH_SEPARATOR, &lasts);
} /* end while */
done:
@@ -689,7 +689,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
continue;
/* attempt to open the dynamic library as a filter library */
- if (H5PL__open(path, search_params->type, &(search_params->key), found, plugin_info) < 0)
+ if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
if (*found)
HGOTO_DONE(SUCCEED)
@@ -755,7 +755,7 @@ H5PL__find_plugin_in_path(const H5PL_search_params_t *search_params, hbool_t *fo
continue;
/* attempt to open the dynamic library as a filter library */
- if (H5PL__open(path, search_params->type, &(search_params->key), found, plugin_info) < 0)
+ if (H5PL__open(path, search_params->type, search_params->key, found, plugin_info) < 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "search in directory failed")
if (*found)
HGOTO_DONE(SUCCEED)
diff --git a/src/H5PLpkg.h b/src/H5PLpkg.h
index d60da82..c3ad8f5 100644
--- a/src/H5PLpkg.h
+++ b/src/H5PLpkg.h
@@ -116,7 +116,7 @@
/* Data used to search for plugins */
typedef struct H5PL_search_params_t {
H5PL_type_t type;
- H5PL_key_t key;
+ const H5PL_key_t *key;
} H5PL_search_params_t;
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index 7fe676d..cd0b4d6 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -276,7 +276,7 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
for (u = 0; u < H5PL_num_plugins_g; u++) {
/* If the plugin type (filter, etc.) and ID match, query the plugin for its info */
- if ((search_params->type == (H5PL_cache_g[u]).type) && (search_params->key.id == (H5PL_cache_g[u]).key.id)) {
+ if ((search_params->type == (H5PL_cache_g[u]).type) && (search_params->key->id == (H5PL_cache_g[u]).key.id)) {
H5PL_get_plugin_info_t get_plugin_info_function;
const H5Z_class2_t *filter_info;
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 610c628..712b264 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -155,7 +155,7 @@ H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id,
/* Set up VOL object */
if(NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
- HGOTO_ERROR(H5E_VOL, H5E_NOSPACE, FAIL, "can't allocate top object structure")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate top object structure")
new_obj->connector = vol_obj->connector;
new_obj->connector->nrefs ++;
new_obj->data = data;
@@ -308,7 +308,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
/* Setup VOL object */
if(NULL == (new_obj = H5FL_CALLOC(H5VL_object_t)))
- HGOTO_ERROR(H5E_VOL, H5E_NOSPACE, FAIL, "can't allocate top object structure")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "can't allocate top object structure")
new_obj->connector = vol_obj->connector;
new_obj->connector->nrefs ++;
new_obj->data = dt;
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 2828262..6e19e07 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -1360,7 +1360,7 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_t get_type,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__attr_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "attribute get failed")
@@ -1368,7 +1368,7 @@ H5VL_attr_get(const H5VL_object_t *vol_obj, H5VL_attr_get_t get_type,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -1473,7 +1473,7 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if((ret_value = H5VL__attr_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute specific callback")
@@ -1481,7 +1481,7 @@ H5VL_attr_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -1584,7 +1584,7 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if((ret_value = H5VL__attr_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute attribute optional callback")
@@ -1592,7 +1592,7 @@ H5VL_attr_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -2207,7 +2207,7 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_t get_type,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__dataset_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "dataset get failed")
@@ -2215,7 +2215,7 @@ H5VL_dataset_get(const H5VL_object_t *vol_obj, H5VL_dataset_get_t get_type,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -2319,7 +2319,7 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_t spec
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__dataset_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset specific callback")
@@ -2327,7 +2327,7 @@ H5VL_dataset_specific(const H5VL_object_t *vol_obj, H5VL_dataset_specific_t spec
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -2432,7 +2432,7 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__dataset_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute dataset optional callback")
@@ -2440,7 +2440,7 @@ H5VL_dataset_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -2617,7 +2617,7 @@ H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
FUNC_ENTER_STATIC
/* Re-issue call to internal file specific callback routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__file_specific(obj, cls, H5VL_FILE_CACHE_VOL_CONN, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed")
@@ -2625,7 +2625,7 @@ H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL__file_cache_connector() */
@@ -2914,7 +2914,7 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__file_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "file get failed")
@@ -2922,7 +2922,7 @@ H5VL_file_get(const H5VL_object_t *vol_obj, H5VL_file_get_t get_type,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -3022,7 +3022,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
FUNC_ENTER_NOAPI(FAIL)
/* Start access to the varargs, so they are available in all situations below */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
/* Special treatment of file access check */
@@ -3033,9 +3033,9 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
hid_t fapl_id; /* File access property list for accessing the file */
/* Get the file access property list to access the file */
- va_copy(tmp_args, arguments);
+ HDva_copy(tmp_args, arguments);
fapl_id = va_arg(tmp_args, hid_t);
- va_end(tmp_args);
+ HDva_end(tmp_args);
/* Get the VOL info from the FAPL */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -3067,7 +3067,7 @@ H5VL_file_specific(const H5VL_object_t *vol_obj, H5VL_file_specific_t specific_t
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -3170,7 +3170,7 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__file_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file optional failed")
@@ -3178,7 +3178,7 @@ H5VL_file_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -3593,7 +3593,7 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__group_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "group get failed")
@@ -3601,7 +3601,7 @@ H5VL_group_get(const H5VL_object_t *vol_obj, H5VL_group_get_t get_type,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -3705,7 +3705,7 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__group_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group specific callback")
@@ -3713,7 +3713,7 @@ H5VL_group_specific(const H5VL_object_t *vol_obj, H5VL_group_specific_t specific
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -3816,7 +3816,7 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if((ret_value = H5VL__group_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute group optional callback")
@@ -3824,7 +3824,7 @@ H5VL_group_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -4372,7 +4372,7 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__link_get(vol_obj->data, loc_params, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "link get failed")
@@ -4380,7 +4380,7 @@ H5VL_link_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_params,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -4484,7 +4484,7 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if((ret_value = H5VL__link_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link specific callback")
@@ -4492,7 +4492,7 @@ H5VL_link_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_pa
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -4595,7 +4595,7 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__link_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute link optional callback")
@@ -4603,7 +4603,7 @@ H5VL_link_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ...)
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -4924,7 +4924,7 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__object_get(vol_obj->data, loc_params, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "get failed")
@@ -4932,7 +4932,7 @@ H5VL_object_get(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_param
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -5037,7 +5037,7 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if((ret_value = H5VL__object_specific(vol_obj->data, loc_params, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "object specific failed")
@@ -5045,7 +5045,7 @@ H5VL_object_specific(const H5VL_object_t *vol_obj, const H5VL_loc_params_t *loc_
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -5152,7 +5152,7 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ..
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__object_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute object optional callback")
@@ -5160,7 +5160,7 @@ H5VL_object_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id, void **req, ..
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -5473,7 +5473,7 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_t get_type,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__datatype_get(vol_obj->data, vol_obj->connector->cls, get_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "datatype get failed")
@@ -5481,7 +5481,7 @@ H5VL_datatype_get(const H5VL_object_t *vol_obj, H5VL_datatype_get_t get_type,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -5589,7 +5589,7 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_t sp
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__datatype_specific(vol_obj->data, vol_obj->connector->cls, specific_type, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype specific callback")
@@ -5597,7 +5597,7 @@ H5VL_datatype_specific(const H5VL_object_t *vol_obj, H5VL_datatype_specific_t sp
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -5701,7 +5701,7 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, req);
+ HDva_start(arguments, req);
arg_started = TRUE;
if(H5VL__datatype_optional(vol_obj->data, vol_obj->connector->cls, dxpl_id, req, arguments) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute datatype optional callback")
@@ -5709,7 +5709,7 @@ H5VL_datatype_optional(const H5VL_object_t *vol_obj, hid_t dxpl_id,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -6265,7 +6265,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj,
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, specific_type);
+ HDva_start(arguments, specific_type);
arg_started = TRUE;
if((ret_value = H5VL__request_specific(vol_obj->data, vol_obj->connector->cls, specific_type, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute asynchronous request specific callback")
@@ -6273,7 +6273,7 @@ H5VL_request_specific(const H5VL_object_t *vol_obj,
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
@@ -6379,7 +6379,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, ...)
vol_wrapper_set = TRUE;
/* Call the corresponding internal VOL routine */
- va_start(arguments, vol_obj);
+ HDva_start(arguments, vol_obj);
arg_started = TRUE;
if((ret_value = H5VL__request_optional(vol_obj->data, vol_obj->connector->cls, arguments)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "unable to execute asynchronous request optional callback")
@@ -6387,7 +6387,7 @@ H5VL_request_optional(const H5VL_object_t *vol_obj, ...)
done:
/* End access to the va_list, if we started it */
if(arg_started)
- va_end(arguments);
+ HDva_end(arguments);
/* Reset object wrapping info in API context */
if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 55f51d7..17dfc1f 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -625,9 +625,12 @@ H5VL_register_connector(const void *_cls, hbool_t app_ref, hid_t vipl_id)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector ID")
done:
- if (ret_value < 0)
- if (saved)
- H5FL_FREE(H5VL_class_t, saved);
+ if (ret_value < 0 && saved) {
+ if (saved->name)
+ H5MM_xfree(saved->name);
+
+ H5FL_FREE(H5VL_class_t, saved);
+ }
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_register_connector() */
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 3fc1a7c..0339205 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -482,7 +482,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
/* H5Aget_space */
case H5VL_ATTR_GET_SPACE:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
H5A_t *attr = (H5A_t *)obj;
if((*ret_id = H5A_get_space(attr)) < 0)
@@ -493,7 +493,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
/* H5Aget_type */
case H5VL_ATTR_GET_TYPE:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
H5A_t *attr = (H5A_t *)obj;
if((*ret_id = H5A__get_type(attr)) < 0)
@@ -504,7 +504,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
/* H5Aget_create_plist */
case H5VL_ATTR_GET_ACPL:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
H5A_t *attr = (H5A_t *)obj;
if((*ret_id = H5A__get_create_plist(attr)) < 0)
@@ -516,10 +516,10 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
/* H5Aget_name */
case H5VL_ATTR_GET_NAME:
{
- const H5VL_loc_params_t *loc_params = va_arg(arguments, const H5VL_loc_params_t *);
- size_t buf_size = va_arg(arguments, size_t);
- char *buf = va_arg(arguments, char *);
- ssize_t *ret_val = va_arg(arguments, ssize_t *);
+ const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
+ size_t buf_size = HDva_arg(arguments, size_t);
+ char *buf = HDva_arg(arguments, char *);
+ ssize_t *ret_val = HDva_arg(arguments, ssize_t *);
H5A_t *attr = NULL;
if(H5VL_OBJECT_BY_SELF == loc_params->type) {
@@ -565,8 +565,8 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
/* H5Aget_info */
case H5VL_ATTR_GET_INFO:
{
- const H5VL_loc_params_t *loc_params = va_arg(arguments, const H5VL_loc_params_t *);
- H5A_info_t *ainfo = va_arg(arguments, H5A_info_t *);
+ const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
+ H5A_info_t *ainfo = HDva_arg(arguments, H5A_info_t *);
H5A_t *attr = NULL;
if(H5VL_OBJECT_BY_SELF == loc_params->type) {
@@ -575,7 +575,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get attribute info")
}
else if(H5VL_OBJECT_BY_NAME == loc_params->type) {
- char *attr_name = va_arg(arguments, char *);
+ char *attr_name = HDva_arg(arguments, char *);
H5G_loc_t loc;
/* check arguments */
@@ -624,7 +624,7 @@ H5VL__native_attr_get(void *obj, H5VL_attr_get_t get_type,
case H5VL_ATTR_GET_STORAGE_SIZE:
{
- hsize_t *ret = va_arg(arguments, hsize_t *);
+ hsize_t *ret = HDva_arg(arguments, hsize_t *);
H5A_t *attr = (H5A_t *)obj;
/* Set return value */
@@ -670,7 +670,7 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
switch(specific_type) {
case H5VL_ATTR_DELETE:
{
- char *attr_name = va_arg(arguments, char *);
+ char *attr_name = HDva_arg(arguments, char *);
if(H5VL_OBJECT_BY_SELF == loc_params->type) {
/* H5Adelete */
@@ -698,8 +698,8 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
case H5VL_ATTR_EXISTS:
{
- const char *attr_name = va_arg(arguments, const char *);
- htri_t *ret = va_arg(arguments, htri_t *);
+ const char *attr_name = HDva_arg(arguments, const char *);
+ htri_t *ret = HDva_arg(arguments, htri_t *);
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Aexists */
/* Check if the attribute exists */
@@ -718,11 +718,11 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
case H5VL_ATTR_ITER:
{
- H5_index_t idx_type = va_arg(arguments, H5_index_t);
- H5_iter_order_t order = va_arg(arguments, H5_iter_order_t);
- hsize_t *idx = va_arg(arguments, hsize_t *);
- H5A_operator2_t op = va_arg(arguments, H5A_operator2_t);
- void *op_data = va_arg(arguments, void *);
+ H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
+ H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
+ hsize_t *idx = HDva_arg(arguments, hsize_t *);
+ H5A_operator2_t op = HDva_arg(arguments, H5A_operator2_t);
+ void *op_data = HDva_arg(arguments, void *);
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Aiterate2 */
/* Iterate over attributes */
@@ -742,8 +742,8 @@ H5VL__native_attr_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
/* H5Arename/rename_by_name */
case H5VL_ATTR_RENAME:
{
- const char *old_name = va_arg(arguments, const char *);
- const char *new_name = va_arg(arguments, const char *);
+ const char *old_name = HDva_arg(arguments, const char *);
+ const char *new_name = HDva_arg(arguments, const char *);
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Arename */
/* Call attribute rename routine */
@@ -782,20 +782,20 @@ static herr_t
H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req, va_list arguments)
{
- H5VL_attr_optional_t optional_type;
+ H5VL_native_attr_optional_t optional_type;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
- optional_type = va_arg(arguments, H5VL_attr_optional_t);
+ optional_type = HDva_arg(arguments, H5VL_native_attr_optional_t);
switch(optional_type) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
- case H5VL_ATTR_ITERATE_OLD:
+ case H5VL_NATIVE_ATTR_ITERATE_OLD:
{
- hid_t loc_id = va_arg(arguments, hid_t);
- unsigned *attr_num = va_arg(arguments, unsigned *);
- H5A_operator1_t op = va_arg(arguments, H5A_operator1_t);
- void *op_data = va_arg(arguments, void *);
+ hid_t loc_id = HDva_arg(arguments, hid_t);
+ unsigned *attr_num = HDva_arg(arguments, unsigned *);
+ H5A_operator1_t op = HDva_arg(arguments, H5A_operator1_t);
+ void *op_data = HDva_arg(arguments, void *);
/* Call the actual iteration routine */
if((ret_value = H5A__iterate_old(loc_id, attr_num, op, op_data)) < 0)
@@ -803,6 +803,13 @@ H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, hid_t H5_ATTR_UNUSED dxpl_i
break;
}
+#else
+ /* XXX: This case only exists because this is the only attribute optional
+ * value and we can't have empty enums. Delete it when we have another
+ * attribute optional enum value.
+ */
+ case H5VL_NATIVE_ATTR_ITERATE_OLD:
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_ATTR_ITERATE_OLD is not a valid value when the library is built without deprecated routines")
#endif /* H5_NO_DEPRECATED_SYMBOLS */
default:
@@ -1059,7 +1066,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_space */
case H5VL_DATASET_GET_SPACE:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
if((*ret_id = H5D__get_space(dset)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get space ID of dataset")
@@ -1070,7 +1077,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_space_statuc */
case H5VL_DATASET_GET_SPACE_STATUS:
{
- H5D_space_status_t *allocation = va_arg(arguments, H5D_space_status_t *);
+ H5D_space_status_t *allocation = HDva_arg(arguments, H5D_space_status_t *);
/* Read data space address and return */
if(H5D__get_space_status(dset, allocation) < 0)
@@ -1082,7 +1089,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_type */
case H5VL_DATASET_GET_TYPE:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
if((*ret_id = H5D__get_type(dset)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get datatype ID of dataset")
@@ -1093,7 +1100,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_create_plist */
case H5VL_DATASET_GET_DCPL:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
if((*ret_id = H5D_get_create_plist(dset)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get creation property list for dataset")
@@ -1104,7 +1111,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_access_plist */
case H5VL_DATASET_GET_DAPL:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
if((*ret_id = H5D_get_access_plist(dset)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get access property list for dataset")
@@ -1115,7 +1122,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_storage_size */
case H5VL_DATASET_GET_STORAGE_SIZE:
{
- hsize_t *ret = va_arg(arguments, hsize_t *);
+ hsize_t *ret = HDva_arg(arguments, hsize_t *);
/* Set return value */
if(H5D__get_storage_size(dset, ret) < 0)
@@ -1126,7 +1133,7 @@ H5VL__native_dataset_get(void *obj, H5VL_dataset_get_t get_type,
/* H5Dget_offset */
case H5VL_DATASET_GET_OFFSET:
{
- haddr_t *ret = va_arg(arguments, haddr_t *);
+ haddr_t *ret = HDva_arg(arguments, haddr_t *);
/* Set return value */
*ret = H5D__get_offset(dset);
@@ -1166,7 +1173,7 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_t specific_type,
/* H5Dspecific_space */
case H5VL_DATASET_SET_EXTENT:
{
- const hsize_t *size = va_arg(arguments, const hsize_t *);
+ const hsize_t *size = HDva_arg(arguments, const hsize_t *);
if(H5D__set_extent(dset, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extent of dataset")
@@ -1175,7 +1182,7 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_t specific_type,
case H5VL_DATASET_FLUSH:
{
- hid_t dset_id = va_arg(arguments, hid_t);
+ hid_t dset_id = HDva_arg(arguments, hid_t);
/* Flush the dataset */
if(H5D__flush(dset, dset_id) < 0)
@@ -1186,7 +1193,7 @@ H5VL__native_dataset_specific(void *obj, H5VL_dataset_specific_t specific_type,
case H5VL_DATASET_REFRESH:
{
- hid_t dset_id = va_arg(arguments, hid_t);
+ hid_t dset_id = HDva_arg(arguments, hid_t);
/* Refresh the dataset */
if((H5D__refresh(dset_id, dset)) < 0)
@@ -1218,13 +1225,13 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req, va_list arguments)
{
H5D_t *dset = NULL; /* Dataset */
- H5VL_dataset_optional_t optional_type = va_arg(arguments, H5VL_dataset_optional_t);
+ H5VL_native_dataset_optional_t optional_type = HDva_arg(arguments, H5VL_native_dataset_optional_t);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
switch(optional_type) {
- case H5VL_DATASET_FORMAT_CONVERT:
+ case H5VL_NATIVE_DATASET_FORMAT_CONVERT:
{
dset = (H5D_t *)obj;
@@ -1259,9 +1266,9 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
- case H5VL_DATASET_GET_CHUNK_INDEX_TYPE:
+ case H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE:
{
- H5D_chunk_index_t *idx_type = va_arg(arguments, H5D_chunk_index_t *);
+ H5D_chunk_index_t *idx_type = HDva_arg(arguments, H5D_chunk_index_t *);
dset = (H5D_t *)obj;
@@ -1275,10 +1282,10 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
- case H5VL_DATASET_GET_CHUNK_STORAGE_SIZE:
+ case H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE:
{
- hsize_t *offset = va_arg(arguments, hsize_t *);
- hsize_t *chunk_nbytes = va_arg(arguments, hsize_t *);
+ hsize_t *offset = HDva_arg(arguments, hsize_t *);
+ hsize_t *chunk_nbytes = HDva_arg(arguments, hsize_t *);
dset = (H5D_t *)obj;
@@ -1293,11 +1300,11 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
- case H5VL_DATASET_CHUNK_READ:
+ case H5VL_NATIVE_DATASET_CHUNK_READ:
{
- const hsize_t *offset = va_arg(arguments, hsize_t *);
- uint32_t *filters = va_arg(arguments, uint32_t *);
- void *buf = va_arg(arguments, void *);
+ const hsize_t *offset = HDva_arg(arguments, hsize_t *);
+ uint32_t *filters = HDva_arg(arguments, uint32_t *);
+ void *buf = HDva_arg(arguments, void *);
hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */
dset = (H5D_t *)obj;
@@ -1321,12 +1328,12 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
- case H5VL_DATASET_CHUNK_WRITE:
+ case H5VL_NATIVE_DATASET_CHUNK_WRITE:
{
- uint32_t filters = va_arg(arguments, uint32_t);
- const hsize_t *offset = va_arg(arguments, const hsize_t *);
- uint32_t data_size_32 = va_arg(arguments, uint32_t);
- const void *buf = va_arg(arguments, const void *);
+ uint32_t filters = HDva_arg(arguments, uint32_t);
+ const hsize_t *offset = HDva_arg(arguments, const hsize_t *);
+ uint32_t data_size_32 = HDva_arg(arguments, uint32_t);
+ const void *buf = HDva_arg(arguments, const void *);
hsize_t offset_copy[H5O_LAYOUT_NDIMS]; /* Internal copy of chunk offset */
dset = (H5D_t *)obj;
@@ -1487,7 +1494,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
case H5VL_FILE_GET_FAPL:
{
H5P_genplist_t *new_plist; /* New property list */
- hid_t *plist_id = va_arg(arguments, hid_t *);
+ hid_t *plist_id = HDva_arg(arguments, hid_t *);
f = (H5F_t *)obj;
@@ -1504,7 +1511,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
case H5VL_FILE_GET_FCPL:
{
H5P_genplist_t *plist; /* Property list */
- hid_t *plist_id = va_arg(arguments, hid_t *);
+ hid_t *plist_id = HDva_arg(arguments, hid_t *);
f = (H5F_t *)obj;
if(NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id)))
@@ -1520,8 +1527,8 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_obj_count */
case H5VL_FILE_GET_OBJ_COUNT:
{
- unsigned types = va_arg(arguments, unsigned);
- ssize_t *ret = va_arg(arguments, ssize_t *);
+ unsigned types = HDva_arg(arguments, unsigned);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
size_t obj_count = 0; /* Number of opened objects */
f = (H5F_t *)obj;
@@ -1537,10 +1544,10 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_obj_ids */
case H5VL_FILE_GET_OBJ_IDS:
{
- unsigned types = va_arg(arguments, unsigned);
- size_t max_objs = va_arg(arguments, size_t);
- hid_t *oid_list = va_arg(arguments, hid_t *);
- ssize_t *ret = va_arg(arguments, ssize_t *);
+ unsigned types = HDva_arg(arguments, unsigned);
+ size_t max_objs = HDva_arg(arguments, size_t);
+ hid_t *oid_list = HDva_arg(arguments, hid_t *);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
size_t obj_count = 0; /* Number of opened objects */
f = (H5F_t *)obj;
@@ -1556,7 +1563,7 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_intent */
case H5VL_FILE_GET_INTENT:
{
- unsigned *intent_flags = va_arg(arguments, unsigned *);
+ unsigned *intent_flags = HDva_arg(arguments, unsigned *);
f = (H5F_t *)obj;
@@ -1585,10 +1592,10 @@ H5VL__native_file_get(void *obj, H5VL_file_get_t get_type,
/* H5Fget_name */
case H5VL_FILE_GET_NAME:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- size_t size = va_arg(arguments, size_t);
- char *name = va_arg(arguments, char *);
- ssize_t *ret = va_arg(arguments, ssize_t *);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ size_t size = HDva_arg(arguments, size_t);
+ char *name = HDva_arg(arguments, char *);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
size_t len;
if(NULL == (f = H5F__get_file(obj, type)))
@@ -1637,8 +1644,8 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fflush */
case H5VL_FILE_FLUSH:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- H5F_scope_t scope = va_arg(arguments, H5F_scope_t);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5F_scope_t scope = HDva_arg(arguments, H5F_scope_t);
H5F_t *f = NULL; /* File to flush */
/* Get the file for the object */
@@ -1670,7 +1677,7 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Freopen */
case H5VL_FILE_REOPEN:
{
- void **ret = va_arg(arguments, void **);
+ void **ret = HDva_arg(arguments, void **);
H5F_t *new_file = NULL;
/* Reopen the file through the VOL connector */
@@ -1685,10 +1692,10 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fmount */
case H5VL_FILE_MOUNT:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- const char *name = va_arg(arguments, const char *);
- H5F_t *child = va_arg(arguments, H5F_t *);
- hid_t plist_id = va_arg(arguments, hid_t);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ const char *name = HDva_arg(arguments, const char *);
+ H5F_t *child = HDva_arg(arguments, H5F_t *);
+ hid_t plist_id = HDva_arg(arguments, hid_t);
H5G_loc_t loc;
if(H5G_loc_real(obj, type, &loc) < 0)
@@ -1704,8 +1711,8 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Funmount */
case H5VL_FILE_UNMOUNT:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- const char *name = va_arg(arguments, const char *);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ const char *name = HDva_arg(arguments, const char *);
H5G_loc_t loc;
if(H5G_loc_real(obj, type, &loc) < 0)
@@ -1721,9 +1728,9 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fis_accessible */
case H5VL_FILE_IS_ACCESSIBLE:
{
- hid_t fapl_id = va_arg(arguments, hid_t);
- const char *name = va_arg(arguments, const char *);
- htri_t *ret = va_arg(arguments, htri_t *);
+ hid_t fapl_id = HDva_arg(arguments, hid_t);
+ const char *name = HDva_arg(arguments, const char *);
+ htri_t *ret = HDva_arg(arguments, htri_t *);
/* Call private routine */
if((*ret = H5F__is_hdf5(name, fapl_id)) < 0)
@@ -1734,8 +1741,8 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
/* H5Fcreate / H5Fopen */
case H5VL_FILE_CACHE_VOL_CONN:
{
- hid_t vol_id = va_arg(arguments, hid_t);
- void *vol_info = va_arg(arguments, void *);
+ hid_t vol_id = HDva_arg(arguments, hid_t);
+ void *vol_info = HDva_arg(arguments, void *);
/* Call private routine */
if(H5F__set_vol_conn((H5F_t *)obj, vol_id, vol_info) < 0)
@@ -1765,7 +1772,7 @@ static herr_t
H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req, va_list arguments)
{
H5F_t *f = NULL; /* File */
- H5VL_file_optional_t optional_type = va_arg(arguments, H5VL_file_optional_t);
+ H5VL_native_file_optional_t optional_type = HDva_arg(arguments, H5VL_native_file_optional_t);
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1773,11 +1780,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
f = (H5F_t *)obj;
switch(optional_type) {
/* H5Fget_filesize */
- case H5VL_FILE_GET_SIZE:
+ case H5VL_NATIVE_FILE_GET_SIZE:
{
haddr_t max_eof_eoa; /* Maximum of the EOA & EOF */
haddr_t base_addr; /* Base address for the file */
- hsize_t *size = va_arg(arguments, hsize_t *);
+ hsize_t *size = HDva_arg(arguments, hsize_t *);
/* Go get the actual file size */
if(H5F__get_max_eof_eoa(f, &max_eof_eoa) < 0)
@@ -1792,11 +1799,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_file_image */
- case H5VL_FILE_GET_FILE_IMAGE:
+ case H5VL_NATIVE_FILE_GET_FILE_IMAGE:
{
- void *buf_ptr = va_arg(arguments, void *);
- ssize_t *ret = va_arg(arguments, ssize_t *);
- size_t buf_len = va_arg(arguments, size_t );
+ void *buf_ptr = HDva_arg(arguments, void *);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
+ size_t buf_len = HDva_arg(arguments, size_t );
/* Do the actual work */
if((*ret = H5F__get_file_image(f, buf_ptr, buf_len)) < 0)
@@ -1805,10 +1812,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_freespace */
- case H5VL_FILE_GET_FREE_SPACE:
+ case H5VL_NATIVE_FILE_GET_FREE_SPACE:
{
hsize_t tot_space; /* Amount of free space in the file */
- hssize_t *ret = va_arg(arguments, hssize_t *);
+ hssize_t *ret = HDva_arg(arguments, hssize_t *);
/* Go get the actual amount of free space in the file */
if(H5MF_get_freespace(f, &tot_space, NULL) < 0)
@@ -1817,12 +1824,13 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_FREE_SECTIONS:
+ /* H5Fget_free_sections */
+ case H5VL_NATIVE_FILE_GET_FREE_SECTIONS:
{
- H5F_sect_info_t *sect_info = va_arg(arguments, H5F_sect_info_t *);
- ssize_t *ret = va_arg(arguments, ssize_t *);
- H5F_mem_t type = va_arg(arguments, H5F_mem_t);
- size_t nsects = va_arg(arguments, size_t);
+ H5F_sect_info_t *sect_info = HDva_arg(arguments, H5F_sect_info_t *);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
+ H5F_mem_t type = HDva_arg(arguments, H5F_mem_t);
+ size_t nsects = HDva_arg(arguments, size_t);
/* Go get the free-space section information in the file */
if((*ret = H5MF_get_free_sections(f, type, nsects, sect_info)) < 0)
@@ -1830,11 +1838,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- /* H5Fget_info2 */
- case H5VL_FILE_GET_INFO:
+ /* H5Fget_info1/2 */
+ case H5VL_NATIVE_FILE_GET_INFO:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- H5F_info2_t *finfo = va_arg(arguments, H5F_info2_t *);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ H5F_info2_t *finfo = HDva_arg(arguments, H5F_info2_t *);
/* Get the file struct. This call is careful to not return the file pointer
* for the top file in a mount hierarchy.
@@ -1850,9 +1858,9 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_mdc_config */
- case H5VL_FILE_GET_MDC_CONF:
+ case H5VL_NATIVE_FILE_GET_MDC_CONF:
{
- H5AC_cache_config_t *config_ptr = va_arg(arguments, H5AC_cache_config_t *);
+ H5AC_cache_config_t *config_ptr = HDva_arg(arguments, H5AC_cache_config_t *);
/* Go get the resize configuration */
if(H5AC_get_cache_auto_resize_config(f->shared->cache, config_ptr) < 0)
@@ -1861,9 +1869,9 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_mdc_hit_rate */
- case H5VL_FILE_GET_MDC_HR:
+ case H5VL_NATIVE_FILE_GET_MDC_HR:
{
- double *hit_rate_ptr = va_arg(arguments, double *);
+ double *hit_rate_ptr = HDva_arg(arguments, double *);
/* Go get the current hit rate */
if(H5AC_get_cache_hit_rate(f->shared->cache, hit_rate_ptr) < 0)
@@ -1872,12 +1880,12 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_mdc_size */
- case H5VL_FILE_GET_MDC_SIZE:
+ case H5VL_NATIVE_FILE_GET_MDC_SIZE:
{
- size_t *max_size_ptr = va_arg(arguments, size_t *);
- size_t *min_clean_size_ptr = va_arg(arguments, size_t *);
- size_t *cur_size_ptr = va_arg(arguments, size_t *);
- int *cur_num_entries_ptr = va_arg(arguments, int *);
+ size_t *max_size_ptr = HDva_arg(arguments, size_t *);
+ size_t *min_clean_size_ptr = HDva_arg(arguments, size_t *);
+ size_t *cur_size_ptr = HDva_arg(arguments, size_t *);
+ int *cur_num_entries_ptr = HDva_arg(arguments, int *);
uint32_t cur_num_entries;
/* Go get the size data */
@@ -1891,10 +1899,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fget_vfd_handle */
- case H5VL_FILE_GET_VFD_HANDLE:
+ case H5VL_NATIVE_FILE_GET_VFD_HANDLE:
{
- void **file_handle = va_arg(arguments, void **);
- hid_t fapl_id = va_arg(arguments, hid_t);
+ void **file_handle = HDva_arg(arguments, void **);
+ hid_t fapl_id = HDva_arg(arguments, hid_t);
/* Retrieve the VFD handle for the file */
if(H5F_get_vfd_handle(f, fapl_id, file_handle) < 0)
@@ -1903,10 +1911,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Iget_file_id */
- case H5VL_FILE_GET_FILE_ID:
+ case H5VL_NATIVE_FILE_GET_FILE_ID:
{
- H5I_type_t type = va_arg(arguments, H5I_type_t);
- hid_t *file_id = va_arg(arguments, hid_t *);
+ H5I_type_t type = HDva_arg(arguments, H5I_type_t);
+ hid_t *file_id = HDva_arg(arguments, hid_t *);
if(NULL == (f = H5F__get_file(obj, type)))
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file or file object")
@@ -1916,7 +1924,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Fclear_elink_file_cache */
- case H5VL_FILE_CLEAR_ELINK_CACHE:
+ case H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE:
{
/* Release the EFC */
if(f->shared->efc)
@@ -1926,7 +1934,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
}
/* H5Freset_mdc_hit_rate_stats */
- case H5VL_FILE_RESET_MDC_HIT_RATE:
+ case H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE:
{
/* Reset the hit rate statistic */
if(H5AC_reset_cache_hit_rate_stats(f->shared->cache) < 0)
@@ -1934,9 +1942,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_SET_MDC_CONFIG:
+ /* H5Fset_mdc_config */
+ case H5VL_NATIVE_FILE_SET_MDC_CONFIG:
{
- H5AC_cache_config_t *config_ptr = va_arg(arguments, H5AC_cache_config_t *);
+ H5AC_cache_config_t *config_ptr = HDva_arg(arguments, H5AC_cache_config_t *);
/* set the resize configuration */
if(H5AC_set_cache_auto_resize_config(f->shared->cache, config_ptr) < 0)
@@ -1944,9 +1953,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_METADATA_READ_RETRY_INFO:
+ /* H5Fget_metadata_read_retry_info */
+ case H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO:
{
- H5F_retry_info_t *info = va_arg(arguments, H5F_retry_info_t *);
+ H5F_retry_info_t *info = HDva_arg(arguments, H5F_retry_info_t *);
if(H5F_get_metadata_read_retry_info(f, info) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't get metadata read retry info")
@@ -1954,7 +1964,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_START_SWMR_WRITE:
+ /* H5Fstart_swmr_write */
+ case H5VL_NATIVE_FILE_START_SWMR_WRITE:
{
if(H5F__start_swmr_write(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't start SWMR write")
@@ -1962,7 +1973,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_START_MDC_LOGGING:
+ /* H5Fstart_mdc_logging */
+ case H5VL_NATIVE_FILE_START_MDC_LOGGING:
{
/* Call mdc logging function */
if(H5C_start_logging(f->shared->cache) < 0)
@@ -1971,7 +1983,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_STOP_MDC_LOGGING:
+ /* H5Fstop_mdc_logging */
+ case H5VL_NATIVE_FILE_STOP_MDC_LOGGING:
{
/* Call mdc logging function */
if(H5C_stop_logging(f->shared->cache) < 0)
@@ -1980,10 +1993,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_MDC_LOGGING_STATUS:
+ /* H5Fget_mdc_logging_status */
+ case H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS:
{
- hbool_t *is_enabled = va_arg(arguments, hbool_t *);
- hbool_t *is_currently_logging = va_arg(arguments, hbool_t *);
+ hbool_t *is_enabled = HDva_arg(arguments, hbool_t *);
+ hbool_t *is_currently_logging = HDva_arg(arguments, hbool_t *);
/* Call mdc logging function */
if(H5C_get_logging_status(f->shared->cache, is_enabled, is_currently_logging) < 0)
@@ -1992,7 +2006,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_FORMAT_CONVERT:
+ /* H5Fformat_convert */
+ case H5VL_NATIVE_FILE_FORMAT_CONVERT:
{
/* Convert the format */
if(H5F__format_convert(f) < 0)
@@ -2001,7 +2016,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_RESET_PAGE_BUFFERING_STATS:
+ /* H5Freset_page_buffering_stats */
+ case H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS:
{
/* Sanity check */
if(NULL == f->shared->page_buf)
@@ -2014,13 +2030,14 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_PAGE_BUFFERING_STATS:
+ /* H5Fget_page_buffering_stats */
+ case H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS:
{
- unsigned *accesses = va_arg(arguments, unsigned *);
- unsigned *hits = va_arg(arguments, unsigned *);
- unsigned *misses = va_arg(arguments, unsigned *);
- unsigned *evictions = va_arg(arguments, unsigned *);
- unsigned *bypasses = va_arg(arguments, unsigned *);
+ unsigned *accesses = HDva_arg(arguments, unsigned *);
+ unsigned *hits = HDva_arg(arguments, unsigned *);
+ unsigned *misses = HDva_arg(arguments, unsigned *);
+ unsigned *evictions = HDva_arg(arguments, unsigned *);
+ unsigned *bypasses = HDva_arg(arguments, unsigned *);
/* Sanity check */
if(NULL == f->shared->page_buf)
@@ -2033,10 +2050,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_MDC_IMAGE_INFO:
+ /* H5Fget_mdc_image_info */
+ case H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO:
{
- haddr_t *image_addr = va_arg(arguments, haddr_t *);
- hsize_t *image_len = va_arg(arguments, hsize_t *);
+ haddr_t *image_addr = HDva_arg(arguments, haddr_t *);
+ hsize_t *image_len = HDva_arg(arguments, hsize_t *);
/* Go get the address and size of the cache image */
if(H5AC_get_mdc_image_info(f->shared->cache, image_addr, image_len) < 0)
@@ -2045,9 +2063,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_GET_EOA:
+ /* H5Fget_eoa */
+ case H5VL_NATIVE_FILE_GET_EOA:
{
- haddr_t *eoa = va_arg(arguments, haddr_t *);
+ haddr_t *eoa = HDva_arg(arguments, haddr_t *);
haddr_t rel_eoa; /* Relative address of EOA */
/* Sanity check */
@@ -2069,9 +2088,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_INCR_FILESIZE:
+ /* H5Fincrement_filesize */
+ case H5VL_NATIVE_FILE_INCR_FILESIZE:
{
- hsize_t increment = va_arg(arguments, hsize_t);
+ hsize_t increment = HDva_arg(arguments, hsize_t);
haddr_t max_eof_eoa; /* Maximum of the relative EOA & EOF */
/* This public routine will work only for drivers with this feature enabled.*/
@@ -2090,10 +2110,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
break;
}
- case H5VL_FILE_SET_LIBVER_BOUNDS:
+ /* H5Fset_latest_format, H5Fset_libver_bounds */
+ case H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS:
{
- H5F_libver_t low = va_arg(arguments, H5F_libver_t);
- H5F_libver_t high = va_arg(arguments, H5F_libver_t);
+ H5F_libver_t low = HDva_arg(arguments, H5F_libver_t);
+ H5F_libver_t high = HDva_arg(arguments, H5F_libver_t);
/* Call internal set_libver_bounds function */
if(H5F__set_libver_bounds(f, low, high) < 0)
@@ -2296,7 +2317,7 @@ H5VL__native_group_get(void *obj, H5VL_group_get_t get_type,
/* H5Gget_create_plist */
case H5VL_GROUP_GET_GCPL:
{
- hid_t *new_gcpl_id = va_arg(arguments, hid_t *);
+ hid_t *new_gcpl_id = HDva_arg(arguments, hid_t *);
H5G_t *grp = (H5G_t *)obj;
if((*new_gcpl_id = H5G_get_create_plist(grp)) < 0)
@@ -2307,8 +2328,8 @@ H5VL__native_group_get(void *obj, H5VL_group_get_t get_type,
/* H5Gget_info */
case H5VL_GROUP_GET_INFO:
{
- const H5VL_loc_params_t *loc_params = va_arg(arguments, const H5VL_loc_params_t *);
- H5G_info_t *group_info = va_arg(arguments, H5G_info_t *);
+ const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
+ H5G_info_t *group_info = HDva_arg(arguments, H5G_info_t *);
H5G_loc_t loc;
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
@@ -2371,7 +2392,7 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_t specific_type,
switch(specific_type) {
case H5VL_GROUP_FLUSH:
{
- hid_t group_id = va_arg(arguments, hid_t);
+ hid_t group_id = HDva_arg(arguments, hid_t);
/* Flush object's metadata to file */
if(H5O_flush_common(&grp->oloc, group_id) < 0)
@@ -2382,7 +2403,7 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_t specific_type,
case H5VL_GROUP_REFRESH:
{
- hid_t group_id = va_arg(arguments, hid_t);
+ hid_t group_id = HDva_arg(arguments, hid_t);
/* Call private function to refresh group object */
if((H5O_refresh_metadata(group_id, grp->oloc)) < 0)
@@ -2413,22 +2434,22 @@ static herr_t
H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req, va_list arguments)
{
- H5VL_group_optional_t optional_type;
+ H5VL_native_group_optional_t optional_type;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
- optional_type = va_arg(arguments, H5VL_group_optional_t);
+ optional_type = HDva_arg(arguments, H5VL_native_group_optional_t);
switch(optional_type) {
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* H5Giterate (deprecated) */
- case H5VL_GROUP_ITERATE_OLD:
+ case H5VL_NATIVE_GROUP_ITERATE_OLD:
{
- const H5VL_loc_params_t *loc_params = va_arg(arguments, const H5VL_loc_params_t *);
- hsize_t idx = va_arg(arguments, hsize_t);
- hsize_t *last_obj = va_arg(arguments, hsize_t *);
- const H5G_link_iterate_t *lnk_op = va_arg(arguments, const H5G_link_iterate_t *);
- void *op_data = va_arg(arguments, void *);
+ const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
+ hsize_t idx = HDva_arg(arguments, hsize_t);
+ hsize_t *last_obj = HDva_arg(arguments, hsize_t *);
+ const H5G_link_iterate_t *lnk_op = HDva_arg(arguments, const H5G_link_iterate_t *);
+ void *op_data = HDva_arg(arguments, void *);
H5G_loc_t grp_loc;
/* Get the location struct for the object */
@@ -2443,11 +2464,11 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
}
/* H5Gget_objinfo (deprecated) */
- case H5VL_GROUP_GET_OBJINFO:
+ case H5VL_NATIVE_GROUP_GET_OBJINFO:
{
- const H5VL_loc_params_t *loc_params = va_arg(arguments, const H5VL_loc_params_t *);
- hbool_t follow_link = va_arg(arguments, unsigned);
- H5G_stat_t *statbuf = va_arg(arguments, H5G_stat_t *);
+ const H5VL_loc_params_t *loc_params = HDva_arg(arguments, const H5VL_loc_params_t *);
+ hbool_t follow_link = HDva_arg(arguments, unsigned);
+ H5G_stat_t *statbuf = HDva_arg(arguments, H5G_stat_t *);
H5G_loc_t grp_loc;
/* Get the location struct for the object */
@@ -2460,6 +2481,15 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
break;
}
+#else
+ /* XXX: These cases only exist because they are the only group optional
+ * values and we can't have empty enums. Delete them when we have
+ * non-deprecated group optional enum values.
+ */
+ case H5VL_NATIVE_GROUP_ITERATE_OLD:
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_GROUP_ITERATE_OLD is not a valid value when the library is built without deprecated routines")
+ case H5VL_NATIVE_GROUP_GET_OBJINFO:
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "H5VL_NATIVE_GROUP_GET_OBJINFO is not a valid value when the library is built without deprecated routines")
#endif /* H5_NO_DEPRECATED_SYMBOLS */
default:
@@ -2751,7 +2781,7 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
/* H5Lget_info/H5Lget_info_by_idx */
case H5VL_LINK_GET_INFO:
{
- H5L_info_t *linfo = va_arg(arguments, H5L_info_t *);
+ H5L_info_t *linfo = HDva_arg(arguments, H5L_info_t *);
/* Get the link information */
if(loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Lget_info */
@@ -2771,9 +2801,9 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
/* H5Lget_name_by_idx */
case H5VL_LINK_GET_NAME:
{
- char *name = va_arg(arguments, char *);
- size_t size = va_arg(arguments, size_t);
- ssize_t *ret = va_arg(arguments, ssize_t *);
+ char *name = HDva_arg(arguments, char *);
+ size_t size = HDva_arg(arguments, size_t);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
/* Get the link name */
if((*ret = H5L_get_name_by_idx(&loc, loc_params->loc_data.loc_by_idx.name, loc_params->loc_data.loc_by_idx.idx_type,
@@ -2786,8 +2816,8 @@ H5VL__native_link_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_link_
/* H5Lget_val/H5Lget_val_by_idx */
case H5VL_LINK_GET_VAL:
{
- void *buf = va_arg(arguments, void *);
- size_t size = va_arg(arguments, size_t);
+ void *buf = HDva_arg(arguments, void *);
+ size_t size = HDva_arg(arguments, size_t);
/* Get the link information */
if(loc_params->type == H5VL_OBJECT_BY_NAME) { /* H5Lget_val */
@@ -2839,7 +2869,7 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
switch(specific_type) {
case H5VL_LINK_EXISTS:
{
- htri_t *ret = va_arg(arguments, htri_t *);
+ htri_t *ret = HDva_arg(arguments, htri_t *);
H5G_loc_t loc;
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
@@ -2854,12 +2884,12 @@ H5VL__native_link_specific(void *obj, const H5VL_loc_params_t *loc_params, H5VL_
case H5VL_LINK_ITER:
{
H5G_loc_t loc;
- hbool_t recursive = va_arg(arguments, int);
- H5_index_t idx_type = va_arg(arguments, H5_index_t);
- H5_iter_order_t order = va_arg(arguments, H5_iter_order_t);
- hsize_t *idx_p = va_arg(arguments, hsize_t *);
- H5L_iterate_t op = va_arg(arguments, H5L_iterate_t);
- void *op_data = va_arg(arguments, void *);
+ hbool_t recursive = HDva_arg(arguments, int);
+ H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
+ H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
+ hsize_t *idx_p = HDva_arg(arguments, hsize_t *);
+ H5L_iterate_t op = HDva_arg(arguments, H5L_iterate_t);
+ void *op_data = HDva_arg(arguments, void *);
/* Get the location */
if(H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
@@ -3075,9 +3105,9 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
/* H5Rget_region */
case H5VL_REF_GET_REGION:
{
- hid_t *ret = va_arg(arguments, hid_t *);
- H5R_type_t H5_ATTR_UNUSED ref_type = va_arg(arguments, H5R_type_t);
- void *ref = va_arg(arguments, void *);
+ hid_t *ret = HDva_arg(arguments, hid_t *);
+ H5R_type_t H5_ATTR_UNUSED ref_type = HDva_arg(arguments, H5R_type_t);
+ void *ref = HDva_arg(arguments, void *);
H5S_t *space = NULL; /* Dataspace object */
/* Get the dataspace with the correct region selected */
@@ -3094,9 +3124,9 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
/* H5Rget_obj_type2 */
case H5VL_REF_GET_TYPE:
{
- H5O_type_t *obj_type = va_arg(arguments, H5O_type_t *);
- H5R_type_t ref_type = va_arg(arguments, H5R_type_t);
- void *ref = va_arg(arguments, void *);
+ H5O_type_t *obj_type = HDva_arg(arguments, H5O_type_t *);
+ H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ void *ref = HDva_arg(arguments, void *);
/* Get the object information */
if(H5R__get_obj_type(loc.oloc->file, ref_type, ref, obj_type) < 0)
@@ -3107,11 +3137,11 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
/* H5Rget_name */
case H5VL_REF_GET_NAME:
{
- ssize_t *ret = va_arg(arguments, ssize_t *);
- char *name = va_arg(arguments, char *);
- size_t size = va_arg(arguments, size_t);
- H5R_type_t ref_type = va_arg(arguments, H5R_type_t);
- void *ref = va_arg(arguments, void *);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
+ char *name = HDva_arg(arguments, char *);
+ size_t size = HDva_arg(arguments, size_t);
+ H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ void *ref = HDva_arg(arguments, void *);
/* Get name */
if((*ret = H5R__get_name(loc.oloc->file, ref_type, ref, name, size)) < 0)
@@ -3122,9 +3152,9 @@ H5VL__native_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5VL_obj
/* H5Iget_name */
case H5VL_ID_GET_NAME:
{
- ssize_t *ret = va_arg(arguments, ssize_t *);
- char *name = va_arg(arguments, char *);
- size_t size = va_arg(arguments, size_t);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
+ char *name = HDva_arg(arguments, char *);
+ size_t size = HDva_arg(arguments, size_t);
/* Retrieve object's name */
if((*ret = H5G_get_name(&loc, name, size, NULL)) < 0)
@@ -3167,7 +3197,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
/* H5Oincr_refcount / H5Odecr_refcount */
case H5VL_OBJECT_CHANGE_REF_COUNT:
{
- int update_ref = va_arg(arguments, int);
+ int update_ref = HDva_arg(arguments, int);
H5O_loc_t *oloc = loc.oloc;
if(H5O_link(oloc, update_ref) < 0)
@@ -3179,7 +3209,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
/* H5Oexists_by_name */
case H5VL_OBJECT_EXISTS:
{
- htri_t *ret = va_arg(arguments, htri_t *);
+ htri_t *ret = HDva_arg(arguments, htri_t *);
if(loc_params->type == H5VL_OBJECT_BY_NAME) {
/* Check if the object exists */
@@ -3193,11 +3223,11 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
case H5VL_OBJECT_VISIT:
{
- H5_index_t idx_type = va_arg(arguments, H5_index_t);
- H5_iter_order_t order = va_arg(arguments, H5_iter_order_t);
- H5O_iterate_t op = va_arg(arguments, H5O_iterate_t);
- void *op_data = va_arg(arguments, void *);
- unsigned fields = va_arg(arguments, unsigned);
+ H5_index_t idx_type = HDva_arg(arguments, H5_index_t);
+ H5_iter_order_t order = HDva_arg(arguments, H5_iter_order_t);
+ H5O_iterate_t op = HDva_arg(arguments, H5O_iterate_t);
+ void *op_data = HDva_arg(arguments, void *);
+ unsigned fields = HDva_arg(arguments, unsigned);
/* Call internal object visitation routine */
if(loc_params->type == H5VL_OBJECT_BY_SELF) {
@@ -3217,7 +3247,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
case H5VL_OBJECT_FLUSH:
{
- hid_t oid = va_arg(arguments, hid_t);
+ hid_t oid = HDva_arg(arguments, hid_t);
/* Flush the object's metadata */
if(H5O_flush(loc.oloc, oid) < 0)
@@ -3228,7 +3258,7 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
case H5VL_OBJECT_REFRESH:
{
- hid_t oid = va_arg(arguments, hid_t);
+ hid_t oid = HDva_arg(arguments, hid_t);
H5O_loc_t *oloc = loc.oloc;
/* Refresh the metadata */
@@ -3240,10 +3270,10 @@ H5VL__native_object_specific(void *obj, const H5VL_loc_params_t *loc_params, H5V
case H5VL_REF_CREATE:
{
- void *ref = va_arg(arguments, void *);
- const char *name = va_arg(arguments, char *);
- H5R_type_t ref_type = va_arg(arguments, H5R_type_t);
- hid_t space_id = va_arg(arguments, hid_t);
+ void *ref = HDva_arg(arguments, void *);
+ const char *name = HDva_arg(arguments, char *);
+ H5R_type_t ref_type = HDva_arg(arguments, H5R_type_t);
+ hid_t space_id = HDva_arg(arguments, hid_t);
H5S_t *space = NULL; /* Pointer to dataspace containing region */
if(space_id != (-1) && (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))))
@@ -3282,8 +3312,8 @@ static herr_t
H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
void H5_ATTR_UNUSED **req, va_list arguments)
{
- H5VL_object_optional_t optional_type = va_arg(arguments, H5VL_object_optional_t);
- H5VL_loc_params_t *loc_params = va_arg(arguments, H5VL_loc_params_t *);
+ H5VL_native_object_optional_t optional_type = HDva_arg(arguments, H5VL_native_object_optional_t);
+ H5VL_loc_params_t *loc_params = HDva_arg(arguments, H5VL_loc_params_t *);
H5G_loc_t loc; /* Location of group */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3294,10 +3324,10 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
switch(optional_type) {
/* H5Oget_info / H5Oget_info_by_name / H5Oget_info_by_idx */
- case H5VL_OBJECT_GET_INFO:
+ case H5VL_NATIVE_OBJECT_GET_INFO:
{
- H5O_info_t *obj_info = va_arg(arguments, H5O_info_t *);
- unsigned fields = va_arg(arguments, unsigned);
+ H5O_info_t *obj_info = HDva_arg(arguments, H5O_info_t *);
+ unsigned fields = HDva_arg(arguments, unsigned);
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Oget_info */
/* Retrieve the object's information */
@@ -3342,11 +3372,11 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
}
/* H5Oget_comment / H5Oget_comment_by_name */
- case H5VL_OBJECT_GET_COMMENT:
+ case H5VL_NATIVE_OBJECT_GET_COMMENT:
{
- char *comment = va_arg(arguments, char *);
- size_t bufsize = va_arg(arguments, size_t);
- ssize_t *ret = va_arg(arguments, ssize_t *);
+ char *comment = HDva_arg(arguments, char *);
+ size_t bufsize = HDva_arg(arguments, size_t);
+ ssize_t *ret = HDva_arg(arguments, ssize_t *);
/* Retrieve the object's comment */
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Oget_comment */
@@ -3363,9 +3393,9 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id,
}
/* H5Oset_comment */
- case H5VL_OBJECT_SET_COMMENT:
+ case H5VL_NATIVE_OBJECT_SET_COMMENT:
{
- const char *comment = va_arg(arguments, char *);
+ const char *comment = HDva_arg(arguments, char *);
if(loc_params->type == H5VL_OBJECT_BY_SELF) { /* H5Oset_comment */
/* (Re)set the object's comment */
@@ -3526,9 +3556,9 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_t get_type,
switch (get_type) {
case H5VL_DATATYPE_GET_BINARY:
{
- ssize_t *nalloc = va_arg(arguments, ssize_t *);
- void *buf = va_arg(arguments, void *);
- size_t size = va_arg(arguments, size_t);
+ ssize_t *nalloc = HDva_arg(arguments, ssize_t *);
+ void *buf = HDva_arg(arguments, void *);
+ size_t size = HDva_arg(arguments, size_t);
if(H5T_encode(dt, (unsigned char *)buf, &size) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't determine serialized length of datatype")
@@ -3540,7 +3570,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_t get_type,
/* H5Tget_create_plist */
case H5VL_DATATYPE_GET_TCPL:
{
- hid_t *ret_id = va_arg(arguments, hid_t *);
+ hid_t *ret_id = HDva_arg(arguments, hid_t *);
if(H5I_INVALID_HID == (*ret_id = H5T__get_create_plist(dt)))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't get object creation info");
@@ -3578,7 +3608,7 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_t specific_type
switch(specific_type) {
case H5VL_DATATYPE_FLUSH:
{
- hid_t type_id = va_arg(arguments, hid_t);
+ hid_t type_id = HDva_arg(arguments, hid_t);
/* To flush metadata and invoke flush callback if there is */
if (H5O_flush_common(&dt->oloc, type_id) < 0)
@@ -3589,7 +3619,7 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_t specific_type
case H5VL_DATATYPE_REFRESH:
{
- hid_t type_id = va_arg(arguments, hid_t);
+ hid_t type_id = HDva_arg(arguments, hid_t);
/* Call private function to refresh datatype object */
if ((H5O_refresh_metadata(type_id, dt->oloc)) < 0)
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index a93ac9a..49102d7 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -11,14 +11,14 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Purpose: This is a "pass through" VOL connector, which forwards each
- * VOL callback to an underlying connector.
- *
- * It is designed as an example VOL connector for developers to
- * use when creating new connectors, especially connectors that
- * are outside of the HDF5 library. As such, it should _NOT_
- * include _any_ private HDF5 header files. This connector should
- * therefore only make public HDF5 API calls and use standard C /
+ * Purpose: This is a "pass through" VOL connector, which forwards each
+ * VOL callback to an underlying connector.
+ *
+ * It is designed as an example VOL connector for developers to
+ * use when creating new connectors, especially connectors that
+ * are outside of the HDF5 library. As such, it should _NOT_
+ * include _any_ private HDF5 header files. This connector should
+ * therefore only make public HDF5 API calls and use standard C /
* POSIX calls.
*/
@@ -39,8 +39,14 @@
/* Whether to display log messge when callback is invoked */
/* (Uncomment to enable) */
-/* #define ENABLE_LOGGING */
+/* #define ENABLE_PASSTHRU_LOGGING */
+/* Hack for missing va_copy() in old Visual Studio editions
+ * (from H5win2_defs.h - used on VS2012 and earlier)
+ */
+#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1800)
+#define va_copy(D,S) ((D) = (S))
+#endif
/************/
/* Typedefs */
@@ -161,7 +167,7 @@ static herr_t H5VL_pass_through_request_free(void *req);
static const H5VL_class_t H5VL_pass_through_g = {
H5VL_PASSTHRU_VERSION, /* version */
(H5VL_class_value_t)H5VL_PASSTHRU_VALUE, /* value */
- H5VL_PASSTHRU_NAME, /* name */
+ H5VL_PASSTHRU_NAME, /* name */
0, /* capability flags */
H5VL_pass_through_init, /* initialize */
H5VL_pass_through_term, /* terminate */
@@ -252,10 +258,10 @@ static hid_t H5VL_PASSTHRU_g = H5I_INVALID_HID;
/*-------------------------------------------------------------------------
* Function: H5VL__pass_through_new_obj
*
- * Purpose: Create a new pass through object for an underlying object
+ * Purpose: Create a new pass through object for an underlying object
*
- * Return: Success: Pointer to the new pass through object
- * Failure: NULL
+ * Return: Success: Pointer to the new pass through object
+ * Failure: NULL
*
* Programmer: Quincey Koziol
* Monday, December 3, 2018
@@ -272,17 +278,17 @@ H5VL_pass_through_new_obj(void *under_obj, hid_t under_vol_id)
new_obj->under_vol_id = under_vol_id;
H5Iinc_ref(new_obj->under_vol_id);
- return(new_obj);
+ return new_obj;
} /* end H5VL__pass_through_new_obj() */
/*-------------------------------------------------------------------------
* Function: H5VL__pass_through_free_obj
*
- * Purpose: Release a pass through object
+ * Purpose: Release a pass through object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Monday, December 3, 2018
@@ -295,18 +301,18 @@ H5VL_pass_through_free_obj(H5VL_pass_through_t *obj)
H5Idec_ref(obj->under_vol_id);
free(obj);
- return(0);
+ return 0;
} /* end H5VL__pass_through_free_obj() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_register
*
- * Purpose: Register the pass-through VOL connector and retrieve an ID
- * for it.
+ * Purpose: Register the pass-through VOL connector and retrieve an ID
+ * for it.
*
- * Return: Success: The ID for the pass-through VOL connector
- * Failure: -1
+ * Return: Success: The ID for the pass-through VOL connector
+ * Failure: -1
*
* Programmer: Quincey Koziol
* Wednesday, November 28, 2018
@@ -323,7 +329,7 @@ H5VL_pass_through_register(void)
if(H5I_VOL != H5Iget_type(H5VL_PASSTHRU_g))
H5VL_PASSTHRU_g = H5VLregister_connector(&H5VL_pass_through_g, H5P_DEFAULT);
- return(H5VL_PASSTHRU_g);
+ return H5VL_PASSTHRU_g;
} /* end H5VL_pass_through_register() */
@@ -331,25 +337,25 @@ H5VL_pass_through_register(void)
* Function: H5VL_pass_through_init
*
* Purpose: Initialize this VOL connector, performing any necessary
- * operations for the connector that will apply to all containers
+ * operations for the connector that will apply to all containers
* accessed with the connector.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static herr_t
H5VL_pass_through_init(hid_t vipl_id)
{
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INIT\n");
#endif
/* Shut compiler up about unused parameter */
vipl_id = vipl_id;
- return(0);
+ return 0;
} /* end H5VL_pass_through_init() */
@@ -357,26 +363,26 @@ H5VL_pass_through_init(hid_t vipl_id)
* Function: H5VL_pass_through_term
*
* Purpose: Terminate this VOL connector, performing any necessary
- * operations for the connector that release connector-wide
- * resources (usually created / initialized with the 'init'
- * callback).
+ * operations for the connector that release connector-wide
+ * resources (usually created / initialized with the 'init'
+ * callback).
*
- * Return: Success: 0
- * Failure: (Can't fail)
+ * Return: Success: 0
+ * Failure: (Can't fail)
*
*---------------------------------------------------------------------------
*/
static herr_t
H5VL_pass_through_term(void)
{
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL TERM\n");
#endif
/* Reset VOL ID */
H5VL_PASSTHRU_g = H5I_INVALID_HID;
- return(0);
+ return 0;
} /* end H5VL_pass_through_term() */
@@ -385,8 +391,8 @@ H5VL_pass_through_term(void)
*
* Purpose: Duplicate the connector's info object.
*
- * Returns: Success: New connector info object
- * Failure: NULL
+ * Returns: Success: New connector info object
+ * Failure: NULL
*
*---------------------------------------------------------------------------
*/
@@ -396,7 +402,7 @@ H5VL_pass_through_info_copy(const void *_info)
const H5VL_pass_through_info_t *info = (const H5VL_pass_through_info_t *)_info;
H5VL_pass_through_info_t *new_info;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INFO Copy\n");
#endif
@@ -409,7 +415,7 @@ H5VL_pass_through_info_copy(const void *_info)
if(info->under_vol_info)
H5VLcopy_connector_info(new_info->under_vol_id, &(new_info->under_vol_info), info->under_vol_info);
- return(new_info);
+ return new_info;
} /* end H5VL_pass_through_info_copy() */
@@ -417,10 +423,10 @@ H5VL_pass_through_info_copy(const void *_info)
* Function: H5VL_pass_through_info_cmp
*
* Purpose: Compare two of the connector's info objects, setting *cmp_value,
- * following the same rules as strcmp().
+ * following the same rules as strcmp().
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -430,7 +436,7 @@ H5VL_pass_through_info_cmp(int *cmp_value, const void *_info1, const void *_info
const H5VL_pass_through_info_t *info1 = (const H5VL_pass_through_info_t *)_info1;
const H5VL_pass_through_info_t *info2 = (const H5VL_pass_through_info_t *)_info2;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INFO Compare\n");
#endif
@@ -444,14 +450,14 @@ H5VL_pass_through_info_cmp(int *cmp_value, const void *_info1, const void *_info
/* Compare under VOL connector classes */
H5VLcmp_connector_cls(cmp_value, info1->under_vol_id, info2->under_vol_id);
if(*cmp_value != 0)
- return(0);
+ return 0;
/* Compare under VOL connector info objects */
H5VLcmp_connector_info(cmp_value, info1->under_vol_id, info1->under_vol_info, info2->under_vol_info);
if(*cmp_value != 0)
- return(0);
+ return 0;
- return(0);
+ return 0;
} /* end H5VL_pass_through_info_cmp() */
@@ -460,8 +466,8 @@ H5VL_pass_through_info_cmp(int *cmp_value, const void *_info1, const void *_info
*
* Purpose: Release an info object for the connector.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -470,7 +476,7 @@ H5VL_pass_through_info_free(void *_info)
{
H5VL_pass_through_info_t *info = (H5VL_pass_through_info_t *)_info;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INFO Free\n");
#endif
@@ -482,7 +488,7 @@ H5VL_pass_through_info_free(void *_info)
/* Free pass through info object itself */
free(info);
- return(0);
+ return 0;
} /* end H5VL_pass_through_info_free() */
@@ -491,8 +497,8 @@ H5VL_pass_through_info_free(void *_info)
*
* Purpose: Serialize an info object for this connector into a string
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -504,7 +510,7 @@ H5VL_pass_through_info_to_str(const void *_info, char **str)
char *under_vol_string = NULL;
size_t under_vol_str_len = 0;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INFO To String\n");
#endif
@@ -520,10 +526,14 @@ H5VL_pass_through_info_to_str(const void *_info, char **str)
*str = (char *)H5allocate_memory(32 + under_vol_str_len, (hbool_t)0);
assert(*str);
- /* Encode our info */
- snprintf(*str, 32 + under_vol_str_len, "under_vol=%u;under_info={%s}", (unsigned)under_value, (under_vol_string ? under_vol_string : ""));
+ /* Encode our info
+ * Normally we'd use snprintf() here for a little extra safety, but that
+ * call had problems on Windows until recently. So, to be as platform-independent
+ * as we can, we're using sprintf() instead.
+ */
+ sprintf(*str, "under_vol=%u;under_info={%s}", (unsigned)under_value, (under_vol_string ? under_vol_string : ""));
- return(0);
+ return 0;
} /* end H5VL_pass_through_info_to_str() */
@@ -532,8 +542,8 @@ H5VL_pass_through_info_to_str(const void *_info, char **str)
*
* Purpose: Deserialize a string into an info object for this connector.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -546,7 +556,7 @@ H5VL_pass_through_str_to_info(const char *str, void **_info)
hid_t under_vol_id;
void *under_vol_info = NULL;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL INFO String To Info\n");
#endif
@@ -576,7 +586,7 @@ H5VL_pass_through_str_to_info(const char *str, void **_info)
/* Set return value */
*_info = info;
- return(0);
+ return 0;
} /* end H5VL_pass_through_str_to_info() */
@@ -585,8 +595,8 @@ H5VL_pass_through_str_to_info(const char *str, void **_info)
*
* Purpose: Retrieve the 'data' for a VOL object.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -595,11 +605,11 @@ H5VL_pass_through_get_object(const void *obj)
{
const H5VL_pass_through_t *o = (const H5VL_pass_through_t *)obj;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL Get object\n");
#endif
- return(H5VLget_object(o->under_object, o->under_vol_id));
+ return H5VLget_object(o->under_object, o->under_vol_id);
} /* end H5VL_pass_through_get_object() */
@@ -608,8 +618,8 @@ H5VL_pass_through_get_object(const void *obj)
*
* Purpose: Retrieve a "wrapper context" for an object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -619,7 +629,7 @@ H5VL_pass_through_get_wrap_ctx(const void *obj, void **wrap_ctx)
const H5VL_pass_through_t *o = (const H5VL_pass_through_t *)obj;
H5VL_pass_through_wrap_ctx_t *new_wrap_ctx;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL WRAP CTX Get\n");
#endif
@@ -634,7 +644,7 @@ H5VL_pass_through_get_wrap_ctx(const void *obj, void **wrap_ctx)
/* Set wrap context to return */
*wrap_ctx = new_wrap_ctx;
- return(0);
+ return 0;
} /* end H5VL_pass_through_get_wrap_ctx() */
@@ -643,8 +653,8 @@ H5VL_pass_through_get_wrap_ctx(const void *obj, void **wrap_ctx)
*
* Purpose: Use a "wrapper context" to wrap a data object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -655,7 +665,7 @@ H5VL_pass_through_wrap_object(void *obj, void *_wrap_ctx)
H5VL_pass_through_t *new_obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL WRAP Object\n");
#endif
@@ -666,7 +676,7 @@ H5VL_pass_through_wrap_object(void *obj, void *_wrap_ctx)
else
new_obj = NULL;
- return(new_obj);
+ return new_obj;
} /* end H5VL_pass_through_wrap_object() */
@@ -675,8 +685,8 @@ H5VL_pass_through_wrap_object(void *obj, void *_wrap_ctx)
*
* Purpose: Release a "wrapper context" for an object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*---------------------------------------------------------------------------
*/
@@ -685,7 +695,7 @@ H5VL_pass_through_free_wrap_ctx(void *_wrap_ctx)
{
H5VL_pass_through_wrap_ctx_t *wrap_ctx = (H5VL_pass_through_wrap_ctx_t *)_wrap_ctx;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL WRAP CTX Free\n");
#endif
@@ -697,17 +707,17 @@ H5VL_pass_through_free_wrap_ctx(void *_wrap_ctx)
/* Free pass through wrap context object itself */
free(wrap_ctx);
- return(0);
+ return 0;
} /* end H5VL_pass_through_free_wrap_ctx() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_create
+ * Function: H5VL_pass_through_attr_create
*
- * Purpose: Creates an attribute on an object.
+ * Purpose: Creates an attribute on an object.
*
- * Return: Success: Pointer to attribute object
- * Failure: NULL
+ * Return: Success: Pointer to attribute object
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
@@ -719,7 +729,7 @@ H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Create\n");
#endif
@@ -734,17 +744,17 @@ H5VL_pass_through_attr_create(void *obj, const H5VL_loc_params_t *loc_params,
else
attr = NULL;
- return((void*)attr);
+ return (void*)attr;
} /* end H5VL_pass_through_attr_create() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_open
+ * Function: H5VL_pass_through_attr_open
*
- * Purpose: Opens an attribute on an object.
+ * Purpose: Opens an attribute on an object.
*
- * Return: Success: Pointer to attribute object
- * Failure: NULL
+ * Return: Success: Pointer to attribute object
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
@@ -756,7 +766,7 @@ H5VL_pass_through_attr_open(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Open\n");
#endif
@@ -771,17 +781,17 @@ H5VL_pass_through_attr_open(void *obj, const H5VL_loc_params_t *loc_params,
else
attr = NULL;
- return((void *)attr);
+ return (void *)attr;
} /* end H5VL_pass_through_attr_open() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_read
+ * Function: H5VL_pass_through_attr_read
*
- * Purpose: Reads data from attribute.
+ * Purpose: Reads data from attribute.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -792,7 +802,7 @@ H5VL_pass_through_attr_read(void *attr, hid_t mem_type_id, void *buf,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)attr;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Read\n");
#endif
@@ -802,17 +812,17 @@ H5VL_pass_through_attr_read(void *attr, hid_t mem_type_id, void *buf,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_read() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_write
+ * Function: H5VL_pass_through_attr_write
*
- * Purpose: Writes data to attribute.
+ * Purpose: Writes data to attribute.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -823,7 +833,7 @@ H5VL_pass_through_attr_write(void *attr, hid_t mem_type_id, const void *buf,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)attr;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Write\n");
#endif
@@ -833,17 +843,17 @@ H5VL_pass_through_attr_write(void *attr, hid_t mem_type_id, const void *buf,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_write() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_get
+ * Function: H5VL_pass_through_attr_get
*
- * Purpose: Gets information about an attribute
+ * Purpose: Gets information about an attribute
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -854,7 +864,7 @@ H5VL_pass_through_attr_get(void *obj, H5VL_attr_get_t get_type, hid_t dxpl_id,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Get\n");
#endif
@@ -864,17 +874,17 @@ H5VL_pass_through_attr_get(void *obj, H5VL_attr_get_t get_type, hid_t dxpl_id,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_get() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_specific
+ * Function: H5VL_pass_through_attr_specific
*
- * Purpose: Specific operation on attribute
+ * Purpose: Specific operation on attribute
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -885,7 +895,7 @@ H5VL_pass_through_attr_specific(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Specific\n");
#endif
@@ -895,7 +905,7 @@ H5VL_pass_through_attr_specific(void *obj, const H5VL_loc_params_t *loc_params,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_specific() */
@@ -904,8 +914,8 @@ H5VL_pass_through_attr_specific(void *obj, const H5VL_loc_params_t *loc_params,
*
* Purpose: Perform a connector-specific operation on an attribute
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -916,7 +926,7 @@ H5VL_pass_through_attr_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Optional\n");
#endif
@@ -926,17 +936,17 @@ H5VL_pass_through_attr_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_optional() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_attr_close
+ * Function: H5VL_pass_through_attr_close
*
- * Purpose: Closes an attribute.
+ * Purpose: Closes an attribute.
*
- * Return: Success: 0
- * Failure: -1, attr not closed.
+ * Return: Success: 0
+ * Failure: -1, attr not closed.
*
*-------------------------------------------------------------------------
*/
@@ -946,7 +956,7 @@ H5VL_pass_through_attr_close(void *attr, hid_t dxpl_id, void **req)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)attr;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL ATTRIBUTE Close\n");
#endif
@@ -960,7 +970,7 @@ H5VL_pass_through_attr_close(void *attr, hid_t dxpl_id, void **req)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_attr_close() */
@@ -982,7 +992,7 @@ H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Create\n");
#endif
@@ -997,7 +1007,7 @@ H5VL_pass_through_dataset_create(void *obj, const H5VL_loc_params_t *loc_params,
else
dset = NULL;
- return((void *)dset);
+ return (void *)dset;
} /* end H5VL_pass_through_dataset_create() */
@@ -1019,7 +1029,7 @@ H5VL_pass_through_dataset_open(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Open\n");
#endif
@@ -1034,7 +1044,7 @@ H5VL_pass_through_dataset_open(void *obj, const H5VL_loc_params_t *loc_params,
else
dset = NULL;
- return((void *)dset);
+ return (void *)dset;
} /* end H5VL_pass_through_dataset_open() */
@@ -1043,8 +1053,8 @@ H5VL_pass_through_dataset_open(void *obj, const H5VL_loc_params_t *loc_params,
*
* Purpose: Reads data elements from a dataset into a buffer.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1055,7 +1065,7 @@ H5VL_pass_through_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dset;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Read\n");
#endif
@@ -1065,7 +1075,7 @@ H5VL_pass_through_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_read() */
@@ -1074,8 +1084,8 @@ H5VL_pass_through_dataset_read(void *dset, hid_t mem_type_id, hid_t mem_space_id
*
* Purpose: Writes data elements from a buffer into a dataset.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1086,7 +1096,7 @@ H5VL_pass_through_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_i
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dset;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Write\n");
#endif
@@ -1096,7 +1106,7 @@ H5VL_pass_through_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_i
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_write() */
@@ -1105,8 +1115,8 @@ H5VL_pass_through_dataset_write(void *dset, hid_t mem_type_id, hid_t mem_space_i
*
* Purpose: Gets information about a dataset
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1117,7 +1127,7 @@ H5VL_pass_through_dataset_get(void *dset, H5VL_dataset_get_t get_type,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dset;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Get\n");
#endif
@@ -1127,17 +1137,17 @@ H5VL_pass_through_dataset_get(void *dset, H5VL_dataset_get_t get_type,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_get() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_dataset_specific
*
- * Purpose: Specific operation on a dataset
+ * Purpose: Specific operation on a dataset
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1148,7 +1158,7 @@ H5VL_pass_through_dataset_specific(void *obj, H5VL_dataset_specific_t specific_t
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL H5Dspecific\n");
#endif
@@ -1158,7 +1168,7 @@ H5VL_pass_through_dataset_specific(void *obj, H5VL_dataset_specific_t specific_t
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_specific() */
@@ -1167,8 +1177,8 @@ H5VL_pass_through_dataset_specific(void *obj, H5VL_dataset_specific_t specific_t
*
* Purpose: Perform a connector-specific operation on a dataset
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1179,7 +1189,7 @@ H5VL_pass_through_dataset_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Optional\n");
#endif
@@ -1189,7 +1199,7 @@ H5VL_pass_through_dataset_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_optional() */
@@ -1198,8 +1208,8 @@ H5VL_pass_through_dataset_optional(void *obj, hid_t dxpl_id, void **req,
*
* Purpose: Closes a dataset.
*
- * Return: Success: 0
- * Failure: -1, dataset not closed.
+ * Return: Success: 0
+ * Failure: -1, dataset not closed.
*
*-------------------------------------------------------------------------
*/
@@ -1209,7 +1219,7 @@ H5VL_pass_through_dataset_close(void *dset, hid_t dxpl_id, void **req)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dset;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATASET Close\n");
#endif
@@ -1223,17 +1233,17 @@ H5VL_pass_through_dataset_close(void *dset, hid_t dxpl_id, void **req)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_dataset_close() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_datatype_commit
+ * Function: H5VL_pass_through_datatype_commit
*
- * Purpose: Commits a datatype inside a container.
+ * Purpose: Commits a datatype inside a container.
*
- * Return: Success: Pointer to datatype object
- * Failure: NULL
+ * Return: Success: Pointer to datatype object
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
@@ -1246,7 +1256,7 @@ H5VL_pass_through_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Commit\n");
#endif
@@ -1261,7 +1271,7 @@ H5VL_pass_through_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params
else
dt = NULL;
- return((void *)dt);
+ return (void *)dt;
} /* end H5VL_pass_through_datatype_commit() */
@@ -1283,7 +1293,7 @@ H5VL_pass_through_datatype_open(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Open\n");
#endif
@@ -1298,17 +1308,17 @@ H5VL_pass_through_datatype_open(void *obj, const H5VL_loc_params_t *loc_params,
else
dt = NULL;
- return((void *)dt);
+ return (void *)dt;
} /* end H5VL_pass_through_datatype_open() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_datatype_get
+ * Function: H5VL_pass_through_datatype_get
*
- * Purpose: Get information about a datatype
+ * Purpose: Get information about a datatype
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1319,7 +1329,7 @@ H5VL_pass_through_datatype_get(void *dt, H5VL_datatype_get_t get_type,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dt;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Get\n");
#endif
@@ -1329,7 +1339,7 @@ H5VL_pass_through_datatype_get(void *dt, H5VL_datatype_get_t get_type,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_datatype_get() */
@@ -1338,8 +1348,8 @@ H5VL_pass_through_datatype_get(void *dt, H5VL_datatype_get_t get_type,
*
* Purpose: Specific operations for datatypes
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1350,7 +1360,7 @@ H5VL_pass_through_datatype_specific(void *obj, H5VL_datatype_specific_t specific
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Specific\n");
#endif
@@ -1360,7 +1370,7 @@ H5VL_pass_through_datatype_specific(void *obj, H5VL_datatype_specific_t specific
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_datatype_specific() */
@@ -1369,8 +1379,8 @@ H5VL_pass_through_datatype_specific(void *obj, H5VL_datatype_specific_t specific
*
* Purpose: Perform a connector-specific operation on a datatype
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1381,7 +1391,7 @@ H5VL_pass_through_datatype_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Optional\n");
#endif
@@ -1391,17 +1401,17 @@ H5VL_pass_through_datatype_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_datatype_optional() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_datatype_close
+ * Function: H5VL_pass_through_datatype_close
*
- * Purpose: Closes a datatype.
+ * Purpose: Closes a datatype.
*
- * Return: Success: 0
- * Failure: -1, datatype not closed.
+ * Return: Success: 0
+ * Failure: -1, datatype not closed.
*
*-------------------------------------------------------------------------
*/
@@ -1411,7 +1421,7 @@ H5VL_pass_through_datatype_close(void *dt, hid_t dxpl_id, void **req)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)dt;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL DATATYPE Close\n");
#endif
@@ -1427,7 +1437,7 @@ H5VL_pass_through_datatype_close(void *dt, hid_t dxpl_id, void **req)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_datatype_close() */
@@ -1450,7 +1460,7 @@ H5VL_pass_through_file_create(const char *name, unsigned flags, hid_t fcpl_id,
hid_t under_fapl_id;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL FILE Create\n");
#endif
@@ -1481,7 +1491,7 @@ H5VL_pass_through_file_create(const char *name, unsigned flags, hid_t fcpl_id,
/* Release copy of our VOL info */
H5VL_pass_through_info_free(info);
- return((void *)file);
+ return (void *)file;
} /* end H5VL_pass_through_file_create() */
@@ -1504,7 +1514,7 @@ H5VL_pass_through_file_open(const char *name, unsigned flags, hid_t fapl_id,
hid_t under_fapl_id;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL FILE Open\n");
#endif
@@ -1535,7 +1545,7 @@ H5VL_pass_through_file_open(const char *name, unsigned flags, hid_t fapl_id,
/* Release copy of our VOL info */
H5VL_pass_through_info_free(info);
- return((void *)file);
+ return (void *)file;
} /* end H5VL_pass_through_file_open() */
@@ -1544,8 +1554,8 @@ H5VL_pass_through_file_open(const char *name, unsigned flags, hid_t fapl_id,
*
* Purpose: Get info about a file
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1556,7 +1566,7 @@ H5VL_pass_through_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)file;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL FILE Get\n");
#endif
@@ -1566,18 +1576,18 @@ H5VL_pass_through_file_get(void *file, H5VL_file_get_t get_type, hid_t dxpl_id,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_file_get() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_file_specific_reissue
*
- * Purpose: Re-wrap vararg arguments into a va_list and reissue the
- * file specific callback to the underlying VOL connector.
+ * Purpose: Re-wrap vararg arguments into a va_list and reissue the
+ * file specific callback to the underlying VOL connector.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1592,17 +1602,17 @@ H5VL_pass_through_file_specific_reissue(void *obj, hid_t connector_id,
ret_value = H5VLfile_specific(obj, connector_id, specific_type, dxpl_id, req, arguments);
va_end(arguments);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_file_specific_reissue() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_file_specific
*
- * Purpose: Specific operation on file
+ * Purpose: Specific operation on file
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1614,7 +1624,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
hid_t under_vol_id = -1;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL FILE Specific\n");
#endif
@@ -1699,7 +1709,7 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_file_specific() */
@@ -1708,8 +1718,8 @@ H5VL_pass_through_file_specific(void *file, H5VL_file_specific_t specific_type,
*
* Purpose: Perform a connector-specific operation on a file
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1720,7 +1730,7 @@ H5VL_pass_through_file_optional(void *file, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)file;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL File Optional\n");
#endif
@@ -1730,7 +1740,7 @@ H5VL_pass_through_file_optional(void *file, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_file_optional() */
@@ -1739,8 +1749,8 @@ H5VL_pass_through_file_optional(void *file, hid_t dxpl_id, void **req,
*
* Purpose: Closes a file.
*
- * Return: Success: 0
- * Failure: -1, file not closed.
+ * Return: Success: 0
+ * Failure: -1, file not closed.
*
*-------------------------------------------------------------------------
*/
@@ -1750,7 +1760,7 @@ H5VL_pass_through_file_close(void *file, hid_t dxpl_id, void **req)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)file;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL FILE Close\n");
#endif
@@ -1764,7 +1774,7 @@ H5VL_pass_through_file_close(void *file, hid_t dxpl_id, void **req)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_file_close() */
@@ -1786,7 +1796,7 @@ H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL GROUP Create\n");
#endif
@@ -1801,7 +1811,7 @@ H5VL_pass_through_group_create(void *obj, const H5VL_loc_params_t *loc_params,
else
group = NULL;
- return((void *)group);
+ return (void *)group;
} /* end H5VL_pass_through_group_create() */
@@ -1823,7 +1833,7 @@ H5VL_pass_through_group_open(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL GROUP Open\n");
#endif
@@ -1838,7 +1848,7 @@ H5VL_pass_through_group_open(void *obj, const H5VL_loc_params_t *loc_params,
else
group = NULL;
- return((void *)group);
+ return (void *)group;
} /* end H5VL_pass_through_group_open() */
@@ -1847,8 +1857,8 @@ H5VL_pass_through_group_open(void *obj, const H5VL_loc_params_t *loc_params,
*
* Purpose: Get info about a group
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1859,7 +1869,7 @@ H5VL_pass_through_group_get(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL GROUP Get\n");
#endif
@@ -1869,17 +1879,17 @@ H5VL_pass_through_group_get(void *obj, H5VL_group_get_t get_type, hid_t dxpl_id,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_group_get() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_group_specific
*
- * Purpose: Specific operation on a group
+ * Purpose: Specific operation on a group
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1890,7 +1900,7 @@ H5VL_pass_through_group_specific(void *obj, H5VL_group_specific_t specific_type,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL GROUP Specific\n");
#endif
@@ -1900,7 +1910,7 @@ H5VL_pass_through_group_specific(void *obj, H5VL_group_specific_t specific_type,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_group_specific() */
@@ -1909,8 +1919,8 @@ H5VL_pass_through_group_specific(void *obj, H5VL_group_specific_t specific_type,
*
* Purpose: Perform a connector-specific operation on a group
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1921,7 +1931,7 @@ H5VL_pass_through_group_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL GROUP Optional\n");
#endif
@@ -1931,7 +1941,7 @@ H5VL_pass_through_group_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_group_optional() */
@@ -1940,8 +1950,8 @@ H5VL_pass_through_group_optional(void *obj, hid_t dxpl_id, void **req,
*
* Purpose: Closes a group.
*
- * Return: Success: 0
- * Failure: -1, group not closed.
+ * Return: Success: 0
+ * Failure: -1, group not closed.
*
*-------------------------------------------------------------------------
*/
@@ -1951,7 +1961,7 @@ H5VL_pass_through_group_close(void *grp, hid_t dxpl_id, void **req)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)grp;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL H5Gclose\n");
#endif
@@ -1965,17 +1975,17 @@ H5VL_pass_through_group_close(void *grp, hid_t dxpl_id, void **req)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_group_close() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_link_create
+ * Function: H5VL_pass_through_link_create
*
- * Purpose: Creates a hard / soft / UD / external link.
+ * Purpose: Creates a hard / soft / UD / external link.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -1986,7 +1996,7 @@ H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, co
hid_t under_vol_id = -1;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Create\n");
#endif
@@ -2018,22 +2028,22 @@ H5VL_pass_through_link_create(H5VL_link_create_type_t create_type, void *obj, co
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_create() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_link_copy
+ * Function: H5VL_pass_through_link_copy
*
- * Purpose: Renames an object within an HDF5 container and copies it to a new
+ * Purpose: Renames an object within an HDF5 container and copies it to a new
* group. The original name SRC is unlinked from the group graph
* and then inserted with the new name DST (which can specify a
* new path for the object) as an atomic operation. The names
* are interpreted relative to SRC_LOC_ID and
* DST_LOC_ID, which are either file IDs or group ID.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2047,7 +2057,7 @@ H5VL_pass_through_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
hid_t under_vol_id = -1;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Copy\n");
#endif
@@ -2064,23 +2074,22 @@ H5VL_pass_through_link_copy(void *src_obj, const H5VL_loc_params_t *loc_params1,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_copy() */
/*-------------------------------------------------------------------------
- * Function:
-H5VL_pass_through_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
+ * Function: H5VL_pass_through_link_move
*
- * Purpose: Moves a link within an HDF5 file to a new group. The original
- * name SRC is unlinked from the group graph
+ * Purpose: Moves a link within an HDF5 file to a new group. The original
+ * name SRC is unlinked from the group graph
* and then inserted with the new name DST (which can specify a
* new path for the object) as an atomic operation. The names
* are interpreted relative to SRC_LOC_ID and
* DST_LOC_ID, which are either file IDs or group ID.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2094,7 +2103,7 @@ H5VL_pass_through_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
hid_t under_vol_id = -1;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Move\n");
#endif
@@ -2111,17 +2120,17 @@ H5VL_pass_through_link_move(void *src_obj, const H5VL_loc_params_t *loc_params1,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_move() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_link_get
+ * Function: H5VL_pass_through_link_get
*
- * Purpose: Get info about a link
+ * Purpose: Get info about a link
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2132,7 +2141,7 @@ H5VL_pass_through_link_get(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Get\n");
#endif
@@ -2142,17 +2151,17 @@ H5VL_pass_through_link_get(void *obj, const H5VL_loc_params_t *loc_params,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_get() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_link_specific
+ * Function: H5VL_pass_through_link_specific
*
- * Purpose: Specific operation on a link
+ * Purpose: Specific operation on a link
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2163,7 +2172,7 @@ H5VL_pass_through_link_specific(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Specific\n");
#endif
@@ -2173,7 +2182,7 @@ H5VL_pass_through_link_specific(void *obj, const H5VL_loc_params_t *loc_params,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_specific() */
@@ -2182,8 +2191,8 @@ H5VL_pass_through_link_specific(void *obj, const H5VL_loc_params_t *loc_params,
*
* Purpose: Perform a connector-specific operation on a link
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2194,7 +2203,7 @@ H5VL_pass_through_link_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL LINK Optional\n");
#endif
@@ -2204,17 +2213,17 @@ H5VL_pass_through_link_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_link_optional() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_object_open
+ * Function: H5VL_pass_through_object_open
*
- * Purpose: Opens an object inside a container.
+ * Purpose: Opens an object inside a container.
*
- * Return: Success: Pointer to object
- * Failure: NULL
+ * Return: Success: Pointer to object
+ * Failure: NULL
*
*-------------------------------------------------------------------------
*/
@@ -2226,7 +2235,7 @@ H5VL_pass_through_object_open(void *obj, const H5VL_loc_params_t *loc_params,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
void *under;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL OBJECT Open\n");
#endif
@@ -2241,17 +2250,17 @@ H5VL_pass_through_object_open(void *obj, const H5VL_loc_params_t *loc_params,
else
new_obj = NULL;
- return((void *)new_obj);
+ return (void *)new_obj;
} /* end H5VL_pass_through_object_open() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_object_copy
+ * Function: H5VL_pass_through_object_copy
*
- * Purpose: Copies an object inside a container.
+ * Purpose: Copies an object inside a container.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2265,7 +2274,7 @@ H5VL_pass_through_object_copy(void *src_obj, const H5VL_loc_params_t *src_loc_pa
H5VL_pass_through_t *o_dst = (H5VL_pass_through_t *)dst_obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL OBJECT Copy\n");
#endif
@@ -2275,17 +2284,17 @@ H5VL_pass_through_object_copy(void *src_obj, const H5VL_loc_params_t *src_loc_pa
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o_src->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_object_copy() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_object_get
+ * Function: H5VL_pass_through_object_get
*
- * Purpose: Get info about an object
+ * Purpose: Get info about an object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2295,7 +2304,7 @@ H5VL_pass_through_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5V
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL OBJECT Get\n");
#endif
@@ -2305,17 +2314,17 @@ H5VL_pass_through_object_get(void *obj, const H5VL_loc_params_t *loc_params, H5V
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_object_get() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_object_specific
*
- * Purpose: Specific operation on an object
+ * Purpose: Specific operation on an object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2327,7 +2336,7 @@ H5VL_pass_through_object_specific(void *obj, const H5VL_loc_params_t *loc_params
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL OBJECT Specific\n");
#endif
@@ -2337,17 +2346,17 @@ H5VL_pass_through_object_specific(void *obj, const H5VL_loc_params_t *loc_params
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_object_specific() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_object_optional
+ * Function: H5VL_pass_through_object_optional
*
- * Purpose: Perform a connector-specific operation for an object
+ * Purpose: Perform a connector-specific operation for an object
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2358,7 +2367,7 @@ H5VL_pass_through_object_optional(void *obj, hid_t dxpl_id, void **req,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL OBJECT Optional\n");
#endif
@@ -2368,20 +2377,20 @@ H5VL_pass_through_object_optional(void *obj, hid_t dxpl_id, void **req,
if(req && *req)
*req = H5VL_pass_through_new_obj(*req, o->under_vol_id);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_object_optional() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_request_wait
+ * Function: H5VL_pass_through_request_wait
*
- * Purpose: Wait (with a timeout) for an async operation to complete
+ * Purpose: Wait (with a timeout) for an async operation to complete
*
- * Note: Releases the request if the operation has completed and the
- * connector callback succeeds
+ * Note: Releases the request if the operation has completed and the
+ * connector callback succeeds
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2392,7 +2401,7 @@ H5VL_pass_through_request_wait(void *obj, uint64_t timeout,
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Wait\n");
#endif
@@ -2401,20 +2410,20 @@ H5VL_pass_through_request_wait(void *obj, uint64_t timeout,
if(ret_value >= 0 && *status != H5ES_STATUS_IN_PROGRESS)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_wait() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_request_notify
+ * Function: H5VL_pass_through_request_notify
*
* Purpose: Registers a user callback to be invoked when an asynchronous
- * operation completes
+ * operation completes
*
- * Note: Releases the request, if connector callback succeeds
+ * Note: Releases the request, if connector callback succeeds
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2424,7 +2433,7 @@ H5VL_pass_through_request_notify(void *obj, H5VL_request_notify_t cb, void *ctx)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Wait\n");
#endif
@@ -2433,19 +2442,19 @@ H5VL_pass_through_request_notify(void *obj, H5VL_request_notify_t cb, void *ctx)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_notify() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_request_cancel
+ * Function: H5VL_pass_through_request_cancel
*
* Purpose: Cancels an asynchronous operation
*
- * Note: Releases the request, if connector callback succeeds
+ * Note: Releases the request, if connector callback succeeds
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2455,7 +2464,7 @@ H5VL_pass_through_request_cancel(void *obj)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Cancel\n");
#endif
@@ -2464,18 +2473,18 @@ H5VL_pass_through_request_cancel(void *obj)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_cancel() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_request_specific_reissue
*
- * Purpose: Re-wrap vararg arguments into a va_list and reissue the
- * request specific callback to the underlying VOL connector.
+ * Purpose: Re-wrap vararg arguments into a va_list and reissue the
+ * request specific callback to the underlying VOL connector.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2490,17 +2499,17 @@ H5VL_pass_through_request_specific_reissue(void *obj, hid_t connector_id,
ret_value = H5VLrequest_specific(obj, connector_id, specific_type, arguments);
va_end(arguments);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_specific_reissue() */
/*-------------------------------------------------------------------------
* Function: H5VL_pass_through_request_specific
*
- * Purpose: Specific operation on a request
+ * Purpose: Specific operation on a request
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2510,7 +2519,7 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
{
herr_t ret_value = -1;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Specific\n");
#endif
@@ -2632,17 +2641,17 @@ H5VL_pass_through_request_specific(void *obj, H5VL_request_specific_t specific_t
else
assert(0 && "Unknown 'specific' operation");
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_specific() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_request_optional
+ * Function: H5VL_pass_through_request_optional
*
- * Purpose: Perform a connector-specific operation for a request
+ * Purpose: Perform a connector-specific operation for a request
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2652,24 +2661,24 @@ H5VL_pass_through_request_optional(void *obj, va_list arguments)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Optional\n");
#endif
ret_value = H5VLrequest_optional(o->under_object, o->under_vol_id, arguments);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_optional() */
/*-------------------------------------------------------------------------
- * Function: H5VL_pass_through_request_free
+ * Function: H5VL_pass_through_request_free
*
* Purpose: Releases a request, allowing the operation to complete without
- * application tracking
+ * application tracking
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -2679,7 +2688,7 @@ H5VL_pass_through_request_free(void *obj)
H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
herr_t ret_value;
-#ifdef ENABLE_LOGGING
+#ifdef ENABLE_PASSTHRU_LOGGING
printf("------- PASS THROUGH VOL REQUEST Free\n");
#endif
@@ -2688,6 +2697,6 @@ H5VL_pass_through_request_free(void *obj)
if(ret_value >= 0)
H5VL_pass_through_free_obj(o);
- return(ret_value);
+ return ret_value;
} /* end H5VL_pass_through_request_free() */
diff --git a/src/H5private.h b/src/H5private.h
index b654bae..f58faec 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1393,6 +1393,9 @@ typedef off_t h5_stat_size_t;
#ifndef HDstrtok
#define HDstrtok(X,Y) strtok(X,Y)
#endif /* HDstrtok */
+#ifndef HDstrtok_r
+ #define HDstrtok_r(X,Y,Z) strtok_r(X,Y,Z)
+#endif /* HDstrtok */
#ifndef HDstrtol
#define HDstrtol(S,R,N) strtol(S,R,N)
#endif /* HDstrtol */
@@ -1495,6 +1498,9 @@ typedef off_t h5_stat_size_t;
#ifndef HDva_arg
#define HDva_arg(A,T) va_arg(A,T)
#endif /* HDva_arg */
+#ifndef HDva_copy
+#define HDva_copy(D,S) va_copy(D,S)
+#endif /* HDva_copy */
#ifndef HDva_end
#define HDva_end(A) va_end(A)
#endif /* HDva_end */
diff --git a/src/H5system.c b/src/H5system.c
index 2d29650..f47d057 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -121,7 +121,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
HDassert(stream);
HDassert(fmt);
- va_start (ap, fmt);
+ HDva_start (ap, fmt);
while (*fmt) {
fwidth = prec = 0;
zerofill = 0;
@@ -170,7 +170,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
s = rest;
} /* end if */
else if ('*'==*s) {
- fwidth = va_arg(ap, int);
+ fwidth = HDva_arg(ap, int);
if(fwidth < 0) {
leftjust = 1;
fwidth = -fwidth;
@@ -185,7 +185,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
prec = (int)HDstrtol(s, &rest, 10);
s = rest;
} else if('*'==*s) {
- prec = va_arg(ap, int);
+ prec = HDva_arg(ap, int);
s++;
}
if(prec < 1)
@@ -272,16 +272,16 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'd':
case 'i':
if(!HDstrcmp(modifier, "h")) {
- short x = (short)va_arg(ap, int);
+ short x = (short)HDva_arg(ap, int);
n = fprintf(stream, format_templ, x);
} else if(!*modifier) {
- int x = va_arg(ap, int);
+ int x = HDva_arg(ap, int);
n = fprintf(stream, format_templ, x);
} else if(!HDstrcmp(modifier, "l")) {
- long x = va_arg(ap, long);
+ long x = HDva_arg(ap, long);
n = fprintf(stream, format_templ, x);
} else {
- int64_t x = va_arg(ap, int64_t);
+ int64_t x = HDva_arg(ap, int64_t);
n = fprintf(stream, format_templ, x);
}
break;
@@ -291,16 +291,16 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'x':
case 'X':
if(!HDstrcmp(modifier, "h")) {
- unsigned short x = (unsigned short)va_arg(ap, unsigned int);
+ unsigned short x = (unsigned short)HDva_arg(ap, unsigned int);
n = fprintf(stream, format_templ, x);
} else if(!*modifier) {
- unsigned int x = va_arg(ap, unsigned int);
+ unsigned int x = HDva_arg(ap, unsigned int);
n = fprintf(stream, format_templ, x);
} else if(!HDstrcmp(modifier, "l")) {
- unsigned long x = va_arg(ap, unsigned long);
+ unsigned long x = HDva_arg(ap, unsigned long);
n = fprintf(stream, format_templ, x);
} else {
- uint64_t x = va_arg(ap, uint64_t);
+ uint64_t x = HDva_arg(ap, uint64_t);
n = fprintf(stream, format_templ, x);
}
break;
@@ -311,10 +311,10 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'g':
case 'G':
if(!HDstrcmp(modifier, "h")) {
- float x = (float)va_arg(ap, double);
+ float x = (float)HDva_arg(ap, double);
n = fprintf(stream, format_templ, (double)x);
} else if(!*modifier || !HDstrcmp(modifier, "l")) {
- double x = va_arg(ap, double);
+ double x = HDva_arg(ap, double);
n = fprintf(stream, format_templ, x);
} else {
/*
@@ -322,10 +322,10 @@ HDfprintf(FILE *stream, const char *fmt, ...)
* `double' are the same thing.
*/
#if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE
- long double x = va_arg(ap, long double);
+ long double x = HDva_arg(ap, long double);
n = fprintf(stream, format_templ, x);
#else
- double x = va_arg(ap, double);
+ double x = HDva_arg(ap, double);
n = fprintf(stream, format_templ, x);
#endif
}
@@ -333,7 +333,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'a':
{
- haddr_t x = va_arg(ap, haddr_t);
+ haddr_t x = HDva_arg(ap, haddr_t);
if(H5F_addr_defined(x)) {
len = 0;
@@ -379,7 +379,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 'c':
{
- char x = (char)va_arg(ap, int);
+ char x = (char)HDva_arg(ap, int);
n = fprintf(stream, format_templ, x);
}
break;
@@ -387,7 +387,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 's':
case 'p':
{
- char *x = va_arg(ap, char*);
+ char *x = HDva_arg(ap, char*);
n = fprintf(stream, format_templ, x);
}
break;
@@ -399,7 +399,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
case 't':
{
- htri_t tri_var = va_arg(ap, htri_t);
+ htri_t tri_var = HDva_arg(ap, htri_t);
if(tri_var > 0)
fprintf(stream, "TRUE");
@@ -423,7 +423,7 @@ HDfprintf(FILE *stream, const char *fmt, ...)
nout++;
}
}
- va_end(ap);
+ HDva_end(ap);
return nout;
} /* end HDfprintf() */
@@ -492,7 +492,8 @@ HDstrtoll(const char *s, const char **rest, int base)
/* Optional minus or plus sign */
if ('+'==*s) {
s++;
- } else if ('-'==*s) {
+ }
+ else if ('-'==*s) {
sign = -1;
s++;
}
@@ -501,10 +502,12 @@ HDstrtoll(const char *s, const char **rest, int base)
if (0==base && '0'==*s && ('x'==s[1] || 'X'==s[1])) {
base = 16;
s += 2;
- } else if (0==base && '0'==*s) {
+ }
+ else if (0==base && '0'==*s) {
base = 8;
s++;
- } else if (0==base) {
+ }
+ else if (0==base) {
base = 10;
}
@@ -525,7 +528,8 @@ HDstrtoll(const char *s, const char **rest, int base)
if (acc*base+digit < acc) {
overflow = TRUE;
- } else {
+ }
+ else {
acc = acc*base + digit;
}
}
@@ -536,7 +540,8 @@ HDstrtoll(const char *s, const char **rest, int base)
if (overflow) {
if (sign>0) {
acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
- } else {
+ }
+ else {
acc = (int64_t)((uint64_t)1<<(8*sizeof(int64_t)-1));
}
errno = ERANGE;
@@ -843,9 +848,9 @@ int c99_snprintf(char* str, size_t size, const char* format, ...)
int count;
va_list ap;
- va_start(ap, format);
+ HDva_start(ap, format);
count = c99_vsnprintf(str, size, format, ap);
- va_end(ap);
+ HDva_end(ap);
return count;
}
diff --git a/src/H5trace.c b/src/H5trace.c
index f6740f4..b94245c 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -135,7 +135,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if(!out)
return 0.0F; /*tracing is off*/
- va_start(ap, type);
+ HDva_start(ap, type);
if(H5_debug_g.ttop) {
if(returning) {
@@ -227,7 +227,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
* name is the null pointer then don't print the argument or the
* following `='. This is used for return values.
*/
- argname = va_arg(ap, char *);
+ argname = HDva_arg(ap, char *);
if(argname) {
unsigned n = (unsigned)MAX (0, (int)HDstrlen(argname) - 3);
@@ -243,7 +243,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
/* The value */
if(ptr)
- vp = va_arg(ap, void *);
+ vp = HDva_arg(ap, void *);
switch(type[0]) {
case 'a':
if(ptr) {
@@ -253,7 +253,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- haddr_t addr = va_arg(ap, haddr_t);
+ haddr_t addr = HDva_arg(ap, haddr_t);
HDfprintf(out, "%a", addr);
} /* end else */
@@ -267,8 +267,8 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- /* Can't pass hbool_t to va_arg() */
- hbool_t bool_var = (hbool_t)va_arg(ap, int);
+ /* Can't pass hbool_t to HDva_arg() */
+ hbool_t bool_var = (hbool_t)HDva_arg(ap, int);
if(TRUE == bool_var)
HDfprintf(out, "TRUE");
else if(!bool_var)
@@ -286,7 +286,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- double dbl = va_arg(ap, double);
+ double dbl = HDva_arg(ap, double);
HDfprintf(out, "%g", dbl);
} /* end else */
@@ -302,7 +302,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)va_arg(ap, int);
+ H5D_alloc_time_t alloc_time = (H5D_alloc_time_t)HDva_arg(ap, int);
switch(alloc_time) {
case H5D_ALLOC_TIME_ERROR:
@@ -340,7 +340,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)va_arg(ap, int);
+ H5FD_mpio_collective_opt_t opt = (H5FD_mpio_collective_opt_t)HDva_arg(ap, int);
switch(opt) {
case H5FD_MPIO_COLLECTIVE_IO:
@@ -366,7 +366,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_fill_time_t fill_time = (H5D_fill_time_t)va_arg(ap, int);
+ H5D_fill_time_t fill_time = (H5D_fill_time_t)HDva_arg(ap, int);
switch(fill_time) {
case H5D_FILL_TIME_ERROR:
@@ -400,7 +400,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_fill_value_t fill_value = (H5D_fill_value_t)va_arg(ap, int);
+ H5D_fill_value_t fill_value = (H5D_fill_value_t)HDva_arg(ap, int);
switch(fill_value) {
case H5D_FILL_VALUE_ERROR:
@@ -434,7 +434,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)va_arg(ap, int);
+ H5FD_mpio_chunk_opt_t opt = (H5FD_mpio_chunk_opt_t)HDva_arg(ap, int);
switch(opt) {
case H5FD_MPIO_CHUNK_DEFAULT:
@@ -464,7 +464,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)va_arg(ap, int);
+ H5D_mpio_actual_io_mode_t actual_io_mode = (H5D_mpio_actual_io_mode_t)HDva_arg(ap, int);
switch(actual_io_mode) {
case H5D_MPIO_NO_COLLECTIVE:
@@ -502,7 +502,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_chunk_index_t idx = (H5D_chunk_index_t)va_arg(ap, int);
+ H5D_chunk_index_t idx = (H5D_chunk_index_t)HDva_arg(ap, int);
switch(idx) {
case H5D_CHUNK_IDX_BTREE:
@@ -548,7 +548,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_layout_t layout = (H5D_layout_t)va_arg(ap, int);
+ H5D_layout_t layout = (H5D_layout_t)HDva_arg(ap, int);
switch(layout) {
case H5D_LAYOUT_ERROR:
@@ -590,7 +590,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)va_arg(ap, int);
+ H5D_mpio_no_collective_cause_t nocol_cause_mode = (H5D_mpio_no_collective_cause_t)HDva_arg(ap, int);
hbool_t flag_already_displayed = FALSE;
/* Check for all bit-flags which might be set */
@@ -637,7 +637,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)va_arg(ap, int);
+ H5D_mpio_actual_chunk_opt_mode_t chunk_opt_mode = (H5D_mpio_actual_chunk_opt_mode_t)HDva_arg(ap, int);
switch(chunk_opt_mode) {
case H5D_MPIO_NO_CHUNK_OPTIMIZATION:
@@ -667,7 +667,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_space_status_t space_status = (H5D_space_status_t)va_arg(ap, int);
+ H5D_space_status_t space_status = (H5D_space_status_t)HDva_arg(ap, int);
switch(space_status) {
case H5D_SPACE_STATUS_NOT_ALLOCATED:
@@ -701,7 +701,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)va_arg(ap, int);
+ H5FD_mpio_xfer_t transfer = (H5FD_mpio_xfer_t)HDva_arg(ap, int);
switch(transfer) {
case H5FD_MPIO_INDEPENDENT:
@@ -727,7 +727,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5D_vds_view_t view = (H5D_vds_view_t)va_arg(ap, int);
+ H5D_vds_view_t view = (H5D_vds_view_t)HDva_arg(ap, int);
switch(view) {
case H5D_VDS_ERROR:
@@ -763,7 +763,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- herr_t status = va_arg(ap, herr_t);
+ herr_t status = HDva_arg(ap, herr_t);
if(status >= 0)
HDfprintf(out, "SUCCEED");
@@ -782,7 +782,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_direction_t direction = (H5E_direction_t)va_arg(ap, int);
+ H5E_direction_t direction = (H5E_direction_t)HDva_arg(ap, int);
switch(direction) {
case H5E_WALK_UPWARD:
@@ -808,7 +808,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_error2_t *error = va_arg(ap, H5E_error2_t *);
+ H5E_error2_t *error = HDva_arg(ap, H5E_error2_t *);
HDfprintf(out, "0x%lx", (unsigned long)error);
} /* end else */
@@ -822,7 +822,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5ES_status_t status = (H5ES_status_t)va_arg(ap, int);
+ H5ES_status_t status = (H5ES_status_t)HDva_arg(ap, int);
switch(status) {
case H5ES_STATUS_IN_PROGRESS:
@@ -853,7 +853,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5E_type_t etype = (H5E_type_t)va_arg(ap, int);
+ H5E_type_t etype = (H5E_type_t)HDva_arg(ap, int);
switch(etype) {
case H5E_MAJOR:
@@ -887,7 +887,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_close_degree_t degree = (H5F_close_degree_t)va_arg(ap, int);
+ H5F_close_degree_t degree = (H5F_close_degree_t)HDva_arg(ap, int);
switch(degree) {
case H5F_CLOSE_DEFAULT:
@@ -921,7 +921,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)va_arg(ap, int);
+ H5F_fspace_strategy_t fs_strategy = (H5F_fspace_strategy_t)HDva_arg(ap, int);
switch(fs_strategy) {
case H5F_FSPACE_STRATEGY_FSM_AGGR:
@@ -956,7 +956,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_mem_t mem_type = (H5F_mem_t)va_arg(ap, int);
+ H5F_mem_t mem_type = (H5F_mem_t)HDva_arg(ap, int);
switch(mem_type) {
case H5FD_MEM_NOLIST:
@@ -1007,7 +1007,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_scope_t scope = (H5F_scope_t)va_arg(ap, int);
+ H5F_scope_t scope = (H5F_scope_t)HDva_arg(ap, int);
switch(scope) {
case H5F_SCOPE_LOCAL:
@@ -1042,7 +1042,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5F_libver_t libver_vers = (H5F_libver_t)va_arg(ap, int);
+ H5F_libver_t libver_vers = (H5F_libver_t)HDva_arg(ap, int);
switch(libver_vers) {
case H5F_LIBVER_EARLIEST:
@@ -1084,7 +1084,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5G_obj_t obj_type = (H5G_obj_t)va_arg(ap, int);
+ H5G_obj_t obj_type = (H5G_obj_t)HDva_arg(ap, int);
switch(obj_type) {
case H5G_UNKNOWN:
@@ -1132,7 +1132,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5G_stat_t *statbuf = va_arg(ap, H5G_stat_t*);
+ H5G_stat_t *statbuf = HDva_arg(ap, H5G_stat_t*);
HDfprintf(out, "0x%lx", (unsigned long)statbuf);
}
@@ -1166,7 +1166,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hsize_t hsize = va_arg(ap, hsize_t);
+ hsize_t hsize = HDva_arg(ap, hsize_t);
if(H5S_UNLIMITED == hsize)
HDfprintf(out, "H5S_UNLIMITED");
@@ -1196,7 +1196,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hssize_t hssize = va_arg(ap, hssize_t);
+ hssize_t hssize = HDva_arg(ap, hssize_t);
HDfprintf(out, "%Hd", hssize);
asize[argno] = (hssize_t)hssize;
@@ -1217,7 +1217,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hid_t obj = va_arg(ap, hid_t);
+ hid_t obj = HDva_arg(ap, hid_t);
if(H5P_DEFAULT == obj)
HDfprintf(out, "H5P_DEFAULT");
@@ -1405,7 +1405,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5_index_t idx_type = (H5_index_t)va_arg(ap, int);
+ H5_index_t idx_type = (H5_index_t)HDva_arg(ap, int);
switch(idx_type) {
case H5_INDEX_UNKNOWN:
@@ -1439,7 +1439,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5_iter_order_t order = (H5_iter_order_t)va_arg(ap, int);
+ H5_iter_order_t order = (H5_iter_order_t)HDva_arg(ap, int);
switch(order) {
case H5_ITER_UNKNOWN:
@@ -1486,7 +1486,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- int is = va_arg(ap, int);
+ int is = HDva_arg(ap, int);
HDfprintf (out, "%d", is);
asize[argno] = is;
@@ -1501,7 +1501,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5I_type_t id_type = (H5I_type_t)va_arg(ap, int);
+ H5I_type_t id_type = (H5I_type_t)HDva_arg(ap, int);
switch (id_type) {
case H5I_UNINIT:
@@ -1592,7 +1592,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned iu = va_arg(ap, unsigned);
+ unsigned iu = HDva_arg(ap, unsigned);
HDfprintf(out, "%u", iu);
asize[argno] = iu;
@@ -1615,7 +1615,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5L_type_t link_type = (H5L_type_t)va_arg(ap, int);
+ H5L_type_t link_type = (H5L_type_t)HDva_arg(ap, int);
switch(link_type) {
case H5L_TYPE_ERROR:
@@ -1662,7 +1662,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end if */
#ifdef H5_HAVE_PARALLEL
else {
- MPI_Comm comm = va_arg(ap, MPI_Comm);
+ MPI_Comm comm = HDva_arg(ap, MPI_Comm);
HDfprintf(out, "%ld", (long)comm);
} /* end else */
@@ -1678,7 +1678,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
} /* end if */
#ifdef H5_HAVE_PARALLEL
else {
- MPI_Info info = va_arg(ap, MPI_Info);
+ MPI_Info info = HDva_arg(ap, MPI_Info);
HDfprintf(out, "%ld", (long)info);
} /* end else */
@@ -1693,7 +1693,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5FD_mem_t mt = (H5FD_mem_t)va_arg(ap, int);
+ H5FD_mem_t mt = (H5FD_mem_t)HDva_arg(ap, int);
switch(mt) {
case H5FD_MEM_NOLIST:
@@ -1752,7 +1752,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- off_t offset = va_arg(ap, off_t);
+ off_t offset = HDva_arg(ap, off_t);
HDfprintf (out, "%ld", (long)offset);
} /* end else */
@@ -1768,7 +1768,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5O_type_t objtype = (H5O_type_t)va_arg(ap, int);
+ H5O_type_t objtype = (H5O_type_t)HDva_arg(ap, int);
switch(objtype) {
case H5O_TYPE_UNKNOWN:
@@ -1812,7 +1812,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hid_t pclass_id = va_arg(ap, hid_t);
+ hid_t pclass_id = HDva_arg(ap, hid_t);
char *class_name = NULL;
H5P_genclass_t *pclass;
@@ -1836,7 +1836,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- hobj_ref_t ref = va_arg(ap, hobj_ref_t);
+ hobj_ref_t ref = HDva_arg(ap, hobj_ref_t);
HDfprintf(out, "Reference Object=%a", ref);
} /* end else */
@@ -1852,7 +1852,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5R_type_t reftype = (H5R_type_t)va_arg(ap, int);
+ H5R_type_t reftype = (H5R_type_t)HDva_arg(ap, int);
switch(reftype) {
case H5R_BADTYPE:
@@ -1894,7 +1894,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_class_t cls = (H5S_class_t)va_arg(ap, int);
+ H5S_class_t cls = (H5S_class_t)HDva_arg(ap, int);
switch(cls) {
case H5S_NO_CLASS:
@@ -1928,7 +1928,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_seloper_t so = (H5S_seloper_t)va_arg(ap, int);
+ H5S_seloper_t so = (H5S_seloper_t)HDva_arg(ap, int);
switch(so) {
case H5S_SELECT_NOOP:
@@ -1986,7 +1986,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5S_sel_type st = (H5S_sel_type)va_arg(ap, int);
+ H5S_sel_type st = (H5S_sel_type)HDva_arg(ap, int);
switch(st) {
case H5S_SEL_ERROR:
@@ -2034,7 +2034,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- const char *str = va_arg(ap, const char *);
+ const char *str = HDva_arg(ap, const char *);
HDfprintf(out, "\"%s\"", str);
} /* end else */
@@ -2050,7 +2050,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_cset_t cset = (H5T_cset_t)va_arg(ap, int);
+ H5T_cset_t cset = (H5T_cset_t)HDva_arg(ap, int);
switch(cset) {
case H5T_CSET_ERROR:
@@ -2097,7 +2097,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_direction_t direct = (H5T_direction_t)va_arg(ap, int);
+ H5T_direction_t direct = (H5T_direction_t)HDva_arg(ap, int);
switch(direct) {
case H5T_DIR_DEFAULT:
@@ -2127,7 +2127,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_pers_t pers = (H5T_pers_t)va_arg(ap, int);
+ H5T_pers_t pers = (H5T_pers_t)HDva_arg(ap, int);
switch(pers) {
case H5T_PERS_DONTCARE:
@@ -2157,7 +2157,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_norm_t norm = (H5T_norm_t)va_arg(ap, int);
+ H5T_norm_t norm = (H5T_norm_t)HDva_arg(ap, int);
switch(norm) {
case H5T_NORM_ERROR:
@@ -2191,7 +2191,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_order_t order = (H5T_order_t)va_arg(ap, int);
+ H5T_order_t order = (H5T_order_t)HDva_arg(ap, int);
switch(order) {
case H5T_ORDER_ERROR:
@@ -2233,7 +2233,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_pad_t pad = (H5T_pad_t)va_arg(ap, int);
+ H5T_pad_t pad = (H5T_pad_t)HDva_arg(ap, int);
switch(pad) {
case H5T_PAD_ERROR:
@@ -2271,7 +2271,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_sign_t sign = (H5T_sign_t)va_arg(ap, int);
+ H5T_sign_t sign = (H5T_sign_t)HDva_arg(ap, int);
switch(sign) {
case H5T_SGN_ERROR:
@@ -2305,7 +2305,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_class_t type_class = (H5T_class_t)va_arg(ap, int);
+ H5T_class_t type_class = (H5T_class_t)HDva_arg(ap, int);
switch(type_class) {
case H5T_NO_CLASS:
@@ -2375,7 +2375,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5T_str_t str = (H5T_str_t)va_arg(ap, int);
+ H5T_str_t str = (H5T_str_t)HDva_arg(ap, int);
switch(str) {
case H5T_STR_ERROR:
@@ -2431,7 +2431,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- htri_t tri_var = va_arg (ap, htri_t);
+ htri_t tri_var = HDva_arg (ap, htri_t);
if(tri_var>0)
HDfprintf (out, "TRUE");
@@ -2461,7 +2461,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned long iul = va_arg(ap, unsigned long);
+ unsigned long iul = HDva_arg(ap, unsigned long);
HDfprintf(out, "%lu", iul);
asize[argno] = (hssize_t)iul;
@@ -2485,7 +2485,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- unsigned long long iull = va_arg(ap, unsigned long long);
+ unsigned long long iull = HDva_arg(ap, unsigned long long);
HDfprintf(out, "%llu", iull);
asize[argno] = (hssize_t)iull;
@@ -2508,7 +2508,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_attr_get_t get = (H5VL_attr_get_t)va_arg(ap, int);
+ H5VL_attr_get_t get = (H5VL_attr_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_ATTR_GET_SPACE:
@@ -2543,7 +2543,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_attr_specific_t specific = (H5VL_attr_specific_t)va_arg(ap, int);
+ H5VL_attr_specific_t specific = (H5VL_attr_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_ATTR_DELETE:
@@ -2572,7 +2572,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_class_value_t class_val = (H5VL_class_value_t)va_arg(ap, H5VL_class_value_t);
+ H5VL_class_value_t class_val = (H5VL_class_value_t)HDva_arg(ap, H5VL_class_value_t);
if(H5_VOL_NATIVE == class_val)
HDfprintf(out, "H5_VOL_NATIVE");
@@ -2588,7 +2588,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_dataset_get_t get = (H5VL_dataset_get_t)va_arg(ap, int);
+ H5VL_dataset_get_t get = (H5VL_dataset_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_DATASET_GET_SPACE:
@@ -2626,7 +2626,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)va_arg(ap, int);
+ H5VL_dataset_specific_t specific = (H5VL_dataset_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_DATASET_SET_EXTENT:
@@ -2652,7 +2652,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_datatype_get_t get = (H5VL_datatype_get_t)va_arg(ap, int);
+ H5VL_datatype_get_t get = (H5VL_datatype_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_DATATYPE_GET_BINARY:
@@ -2675,7 +2675,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)va_arg(ap, int);
+ H5VL_datatype_specific_t specific = (H5VL_datatype_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_DATATYPE_FLUSH:
@@ -2698,7 +2698,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_file_get_t get = (H5VL_file_get_t)va_arg(ap, int);
+ H5VL_file_get_t get = (H5VL_file_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_FILE_GET_FAPL:
@@ -2733,7 +2733,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_file_specific_t specific = (H5VL_file_specific_t)va_arg(ap, int);
+ H5VL_file_specific_t specific = (H5VL_file_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_FILE_FLUSH:
@@ -2768,7 +2768,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_group_get_t get = (H5VL_group_get_t)va_arg(ap, int);
+ H5VL_group_get_t get = (H5VL_group_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_GROUP_GET_GCPL:
@@ -2791,7 +2791,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_group_specific_t specific = (H5VL_group_specific_t)va_arg(ap, int);
+ H5VL_group_specific_t specific = (H5VL_group_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_GROUP_FLUSH:
@@ -2814,7 +2814,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_link_create_type_t create = (H5VL_link_create_type_t)va_arg(ap, int);
+ H5VL_link_create_type_t create = (H5VL_link_create_type_t)HDva_arg(ap, int);
switch(create) {
case H5VL_LINK_CREATE_HARD:
@@ -2840,7 +2840,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_link_get_t get = (H5VL_link_get_t)va_arg(ap, int);
+ H5VL_link_get_t get = (H5VL_link_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_LINK_GET_INFO:
@@ -2866,7 +2866,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_link_specific_t specific = (H5VL_link_specific_t)va_arg(ap, int);
+ H5VL_link_specific_t specific = (H5VL_link_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_LINK_DELETE:
@@ -2892,7 +2892,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_object_get_t get = (H5VL_object_get_t)va_arg(ap, int);
+ H5VL_object_get_t get = (H5VL_object_get_t)HDva_arg(ap, int);
switch(get) {
case H5VL_REF_GET_REGION:
@@ -2921,7 +2921,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_object_specific_t specific = (H5VL_object_specific_t)va_arg(ap, int);
+ H5VL_object_specific_t specific = (H5VL_object_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_OBJECT_CHANGE_REF_COUNT:
@@ -2956,7 +2956,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5VL_request_specific_t specific = (H5VL_request_specific_t)va_arg(ap, int);
+ H5VL_request_specific_t specific = (H5VL_request_specific_t)HDva_arg(ap, int);
switch(specific) {
case H5VL_REQUEST_WAITANY:
@@ -3001,7 +3001,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- vp = va_arg (ap, void *);
+ vp = HDva_arg (ap, void *);
if(vp)
HDfprintf(out, "0x%lx", (unsigned long)vp);
@@ -3027,7 +3027,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- size_t size = va_arg(ap, size_t);
+ size_t size = HDva_arg(ap, size_t);
HDfprintf(out, "%Zu", size);
asize[argno] = (hssize_t)size;
@@ -3044,7 +3044,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)va_arg(ap, int);
+ H5Z_SO_scale_type_t scale_type = (H5Z_SO_scale_type_t)HDva_arg(ap, int);
switch(scale_type) {
case H5Z_SO_FLOAT_DSCALE:
@@ -3074,7 +3074,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_class2_t *filter = va_arg(ap, H5Z_class2_t*);
+ H5Z_class2_t *filter = HDva_arg(ap, H5Z_class2_t*);
HDfprintf(out, "0x%lx", (unsigned long)filter);
} /* end else */
@@ -3088,7 +3088,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_EDC_t edc = (H5Z_EDC_t)va_arg(ap, int);
+ H5Z_EDC_t edc = (H5Z_EDC_t)HDva_arg(ap, int);
if(H5Z_DISABLE_EDC == edc)
HDfprintf(out, "H5Z_DISABLE_EDC");
@@ -3107,7 +3107,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- H5Z_filter_t id = va_arg(ap, H5Z_filter_t);
+ H5Z_filter_t id = HDva_arg(ap, H5Z_filter_t);
if(H5Z_FILTER_DEFLATE == id)
HDfprintf(out, "H5Z_FILTER_DEFLATE");
@@ -3133,7 +3133,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
HDfprintf(out, "NULL");
} /* end if */
else {
- ssize_t ssize = va_arg(ap, ssize_t);
+ ssize_t ssize = HDva_arg(ap, ssize_t);
HDfprintf(out, "%Zd", ssize);
asize[argno] = (hssize_t)ssize;
@@ -3161,7 +3161,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
(event_time.etime - *returning));
error:
- va_end(ap);
+ HDva_end(ap);
if(returning)
HDfprintf(out, ";\n");
else {
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 4522228..140afc3 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -62,9 +62,17 @@ typedef __int64 h5_stat_size_t;
#define HDstat(S,B) _stati64(S,B)
#define HDstrcasecmp(A,B) _stricmp(A,B)
#define HDstrdup(S) _strdup(S)
+#define HDstrtok_r(X,Y,Z) strtok_s(X,Y,Z)
#define HDtzset() _tzset()
#define HDunlink(S) _unlink(S)
#define HDwrite(F,M,Z) _write(F,M,Z)
+#if (_MSC_VER < 1800)
+/* va_copy() does not exist on pre-2013 Visual Studio. Since va_lists are
+ * just pointers into the stack in those CRTs, the usual work-around
+ * is to just define the operation as a pointer copy.
+ */
+#define HDva_copy(D,S) ((D) = (S))
+#endif /* MSC_VER < 1800 */
#ifdef H5_HAVE_VISUAL_STUDIO