From e21c1cf7c6ee6dba5dd5bfd1a525227ac1304b53 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 8 Dec 2018 08:14:05 -0800 Subject: Removed H5I_REFERENCE from the library. It has always been unused and has been marked 'deprecated' since 1.10.0. Fixes HDFFV-10252. --- c++/src/H5IdComponent.cpp | 2 -- c++/src/H5PropList.cpp | 1 - java/src/hdf/hdf5lib/HDF5Constants.java | 3 --- java/src/jni/h5Constants.c | 2 -- release_docs/RELEASE.txt | 14 ++++++++++++ src/H5Fint.c | 2 -- src/H5Gloc.c | 3 --- src/H5Gname.c | 1 - src/H5Gtest.c | 1 - src/H5I.c | 1 - src/H5Ipublic.h | 4 ---- src/H5O.c | 1 - src/H5Oflush.c | 1 - src/H5Oint.c | 1 - src/H5Rint.c | 38 ++++++--------------------------- src/H5T.c | 1 - src/H5VLint.c | 1 - src/H5trace.c | 8 ------- test/links.c | 2 -- test/tfile.c | 1 - 20 files changed, 20 insertions(+), 68 deletions(-) diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 20a0a99..40520aa 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -174,7 +174,6 @@ H5I_type_t IdComponent::getHDFObjType() const /// \li \c H5I_DATASPACE /// \li \c H5I_DATASET /// \li \c H5I_ATTR -/// \li \c H5I_REFERENCE (DEPRECATED) /// \li \c H5I_VFL /// \li \c H5I_VOL /// \li \c H5I_GENPROP_CLS @@ -228,7 +227,6 @@ bool IdComponent::isValid(hid_t an_id) /// \li \c H5I_DATASPACE /// \li \c H5I_DATASET /// \li \c H5I_ATTR -/// \li \c H5I_REFERENCE (DEPRECATED) /// \li \c H5I_VFL /// \li \c H5I_VOL /// \li \c H5I_GENPROP_CLS diff --git a/c++/src/H5PropList.cpp b/c++/src/H5PropList.cpp index 99f722c..a01878c 100644 --- a/c++/src/H5PropList.cpp +++ b/c++/src/H5PropList.cpp @@ -149,7 +149,6 @@ PropList::PropList(const hid_t plist_id) : IdComponent() case H5I_DATASPACE: case H5I_DATASET: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_ERROR_CLASS: diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index b530f4b..0760e7f 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -315,7 +315,6 @@ public class HDF5Constants { public static final int H5I_GROUP = H5I_GROUP(); public static final int H5I_INVALID_HID = H5I_INVALID_HID(); public static final int H5I_NTYPES = H5I_NTYPES(); - public static final int H5I_REFERENCE = H5I_REFERENCE(); public static final int H5I_UNINIT = H5I_UNINIT(); public static final int H5I_VFL = H5I_VFL(); public static final int H5I_VOL = H5I_VOL(); @@ -1222,8 +1221,6 @@ public class HDF5Constants { private static native final int H5I_NTYPES(); - private static native final int H5I_REFERENCE(); - private static native final int H5I_UNINIT(); private static native final int H5I_VFL(); diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c index fdec61a..b13dc76 100644 --- a/java/src/jni/h5Constants.c +++ b/java/src/jni/h5Constants.c @@ -603,8 +603,6 @@ Java_hdf_hdf5lib_HDF5Constants_H5I_1DATASET(JNIEnv *env, jclass cls) { return H5 JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5I_1ATTR(JNIEnv *env, jclass cls) { return H5I_ATTR; } JNIEXPORT jint JNICALL -Java_hdf_hdf5lib_HDF5Constants_H5I_1REFERENCE(JNIEnv *env, jclass cls) { return H5I_REFERENCE; } -JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5I_1VFL(JNIEnv *env, jclass cls) { return H5I_VFL; } JNIEXPORT jint JNICALL Java_hdf_hdf5lib_HDF5Constants_H5I_1VOL(JNIEnv *env, jclass cls) { return H5I_VOL; } diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c5c8300..0df856f 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -120,6 +120,12 @@ New Features (ADB - 2018/09/18, HDFFV-10332) + - Remove H5I_REFERENCE from the library + + This ID class was never used by the library and has been removed. + + (DER - 2018/12/08, HDFFV-10252) + Parallel Library: ----------------- @@ -182,6 +188,14 @@ New Features Java Library: ---------------- + - Removed H5I_REFERENCE from the Java wrappers + + This ID class was never used by the library and has been removed + from the Java wrappers. + + (DER - 2018/12/08, HDFFV-10252) + + Tools: ------ - diff --git a/src/H5Fint.c b/src/H5Fint.c index 056a98b..4ac74ad 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -492,7 +492,6 @@ H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_BADID: case H5I_FILE: case H5I_DATASPACE: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: @@ -3601,7 +3600,6 @@ H5F__get_file(void *obj, H5I_type_t type) case H5I_UNINIT: case H5I_BADID: case H5I_DATASPACE: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Gloc.c b/src/H5Gloc.c index 2dacd94..5724031 100644 --- a/src/H5Gloc.c +++ b/src/H5Gloc.c @@ -210,9 +210,6 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc) break; } - case H5I_REFERENCE: - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of reference") - case H5I_DATASPACE: HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace") diff --git a/src/H5Gname.c b/src/H5Gname.c index f6ddeeb..2aece2b 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -821,7 +821,6 @@ H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Gtest.c b/src/H5Gtest.c index 1995015..af6acb3 100644 --- a/src/H5Gtest.c +++ b/src/H5Gtest.c @@ -609,7 +609,6 @@ H5G__user_path_test(hid_t obj_id, char *user_path, size_t *user_path_len, unsign case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5I.c b/src/H5I.c index 68cbe55..ca9ff61 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -2372,7 +2372,6 @@ H5I__id_dump_cb(void *_item, void H5_ATTR_UNUSED *_key, void *_udata) case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Ipublic.h b/src/H5Ipublic.h index f4b5cc9..56873ec 100644 --- a/src/H5Ipublic.h +++ b/src/H5Ipublic.h @@ -29,9 +29,6 @@ * * When adding types here, add a section to the 'misc19' test in test/tmisc.c * to verify that the H5I{inc|dec|get}_ref() routines work correctly with it. - * - * NOTE: H5I_REFERENCE is not used by the library and has been deprecated - * with a tentative removal version of 1.12.0. (DER, July 2017) */ typedef enum H5I_type_t { H5I_UNINIT = (-2), /* uninitialized type */ @@ -42,7 +39,6 @@ typedef enum H5I_type_t { H5I_DATASPACE, /* type ID for Dataspace objects */ H5I_DATASET, /* type ID for Dataset objects */ H5I_ATTR, /* type ID for Attribute objects */ - H5I_REFERENCE, /* *DEPRECATED* type ID for Reference objects */ H5I_VFL, /* type ID for virtual file layer */ H5I_VOL, /* type ID for virtual object layer */ H5I_GENPROP_CLS, /* type ID for generic property list classes */ diff --git a/src/H5O.c b/src/H5O.c index 2ea8c10..0212dc4 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -1104,7 +1104,6 @@ H5Oclose(hid_t object_id) case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Oflush.c b/src/H5Oflush.c index 3e1ae46..da9d1d0 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -484,7 +484,6 @@ H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, H5VL_t *vol_connector case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Oint.c b/src/H5Oint.c index 52290f2..a97a2fd 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -1765,7 +1765,6 @@ H5O_get_loc(hid_t object_id) case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5Rint.c b/src/H5Rint.c index 365facd..a4f76ce 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -62,18 +62,6 @@ hbool_t H5_PKG_INIT_VAR = FALSE; /* Local Variables */ /*******************/ -/* Reference ID class - * - * NOTE: H5I_REFERENCE is not used by the library and has been deprecated - * with a tentative removal version of 1.12.0. (DER, July 2017) - */ -static const H5I_class_t H5I_REFERENCE_CLS[1] = {{ - H5I_REFERENCE, /* ID class value */ - 0, /* Class flags */ - 0, /* # of reserved IDs for class */ - NULL /* Callback routine for closing objects of this class */ -}}; - /* Flag indicating "top" of interface has been initialized */ static hbool_t H5R_top_package_initialize_s = FALSE; @@ -97,11 +85,7 @@ H5R__init_package(void) FUNC_ENTER_NOAPI_NOINIT - /* Initialize the atom group for the file IDs */ - if (H5I_register_type(H5I_REFERENCE_CLS) < 0) - HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to initialize interface") - - /* Mark "top" of interface as initialized, too */ + /* Mark "top" of interface as initialized */ H5R_top_package_initialize_s = TRUE; done: @@ -134,16 +118,10 @@ H5R_top_term_package(void) FUNC_ENTER_NOAPI_NOINIT_NOERR - if (H5R_top_package_initialize_s) { - if (H5I_nmembers(H5I_REFERENCE) > 0) { - (void)H5I_clear_type(H5I_REFERENCE, FALSE, FALSE); - n++; - } - - /* Mark closed */ - if (0 == n) + /* Mark closed if initialized */ + if(H5R_top_package_initialize_s) + if(0 == n) H5R_top_package_initialize_s = FALSE; - } FUNC_LEAVE_NOAPI(n) } /* end H5R_top_term_package() */ @@ -176,16 +154,12 @@ H5R_term_package(void) FUNC_ENTER_NOAPI_NOINIT_NOERR - if (H5_PKG_INIT_VAR) { + if(H5_PKG_INIT_VAR) { /* Sanity checks */ - HDassert(0 == H5I_nmembers(H5I_REFERENCE)); HDassert(FALSE == H5R_top_package_initialize_s); - /* Destroy the reference id group */ - n += (H5I_dec_type_ref(H5I_REFERENCE) > 0); - /* Mark closed */ - if (0 == n) + if(0 == n) H5_PKG_INIT_VAR = FALSE; } diff --git a/src/H5T.c b/src/H5T.c index cd54183..01ace87 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1729,7 +1729,6 @@ H5Tcopy(hid_t type_id) case H5I_GROUP: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5VLint.c b/src/H5VLint.c index 82886cd..55f51d7 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -793,7 +793,6 @@ H5VL__object(hid_t id, H5I_type_t obj_type) case H5I_UNINIT: case H5I_BADID: case H5I_DATASPACE: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/src/H5trace.c b/src/H5trace.c index d5aad06..f6740f4 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -1355,10 +1355,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, "%ld (attr)", (long)obj); break; - case H5I_REFERENCE: - HDfprintf(out, "%ld (reference)", (long)obj); - break; - case H5I_VFL: HDfprintf(out, "%ld (file driver)", (long)obj); break; @@ -1540,10 +1536,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...) HDfprintf(out, "H5I_ATTR"); break; - case H5I_REFERENCE: - HDfprintf(out, "H5I_REFERENCE"); - break; - case H5I_VFL: HDfprintf(out, "H5I_VFL"); break; diff --git a/test/links.c b/test/links.c index e0dc39e..b10d0ad 100644 --- a/test/links.c +++ b/test/links.c @@ -7743,7 +7743,6 @@ done: case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: @@ -7832,7 +7831,6 @@ done: case H5I_FILE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: diff --git a/test/tfile.c b/test/tfile.c index e342da0..8a8b889 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1430,7 +1430,6 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, case H5I_DATATYPE: case H5I_DATASPACE: case H5I_ATTR: - case H5I_REFERENCE: case H5I_VFL: case H5I_VOL: case H5I_GENPROP_CLS: -- cgit v0.12 From 88137324fcd669e280df62510370a855875b8336 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 13 Dec 2018 09:40:43 -0600 Subject: HDFFV-10660 Add new files to OUTPUT section of custom commands --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12b7db0..23b405a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -950,6 +950,7 @@ 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} @@ -965,6 +966,7 @@ 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} @@ -977,6 +979,7 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) else () add_custom_command ( OUTPUT ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c + ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}$ ARGS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c COMMAND ${CMAKE_COMMAND} @@ -987,6 +990,7 @@ 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} @@ -1011,6 +1015,7 @@ 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}$ ARGS ${HDF5_BINARY_DIR}/H5lib_settings.c COMMAND ${CMAKE_COMMAND} @@ -1022,6 +1027,7 @@ 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} -- cgit v0.12 From 98309270710fea1aee7012ded776be4260c63df8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 13 Dec 2018 12:52:50 -0600 Subject: TRILABS - exclude host info lines --- config/cmake_ext_mod/runTest.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index e8033c5..0bc2db0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -144,7 +144,7 @@ if (TEST_MASK_ERROR) # the error stack remains in the .err file file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif () - string (REGEX REPLACE "[.]*_pmi_alps[.]*\n" "" TEST_STREAM "${TEST_STREAM}") + string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") -- cgit v0.12 From 248442eb00ec254bf632ddf6a0f62ed5f442a3f0 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 13 Dec 2018 14:10:30 -0600 Subject: If MPI is enabled java will not compile because of include. --- java/src/jni/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 7b95e0b..50e76e1 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -48,7 +48,9 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) ########### JNI libraries always must be built shared ############### add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS}) -target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR}) +target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} + PRIVATE "${HDF5_BINARY_DIR};${HDF5_JAVA_JNI_SOURCE_DIR};$<$:${MPI_C_INCLUDE_DIRS}>" +) TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED) target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET}) set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni) -- cgit v0.12 From f9f6e9fe24d8b0996a79af57d80e21a950f5009f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 13 Dec 2018 15:32:49 -0600 Subject: Still need the stamp1 files if PREGEN --- src/CMakeLists.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23b405a..778505f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1002,6 +1002,26 @@ if (NOT EXISTS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c) 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) -- cgit v0.12 From 247a6afb7e7fb1bc08a31cb7edbbea5f5b44eb93 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 13 Dec 2018 17:31:00 -0600 Subject: Fix plugin code from referencing invalid key ID value, and also switch from strtok() to strtok_r() to avoid possible interference with / to application use of strtok(). --- src/H5PLint.c | 2 +- src/H5PLpath.c | 10 +++++----- src/H5PLpkg.h | 2 +- src/H5PLplugin_cache.c | 2 +- src/H5private.h | 3 +++ test/h5test.c | 15 +++++++++------ 6 files changed, 20 insertions(+), 14 deletions(-) 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/H5private.h b/src/H5private.h index b654bae..f48fa7b 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 */ diff --git a/test/h5test.c b/test/h5test.c index 0805f06..6aad76a 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -855,6 +855,7 @@ h5_get_vfd_fapl(hid_t fapl) { const char *env = NULL; /* HDF5_DRIVER environment variable */ const char *tok = NULL; /* strtok pointer */ + char *lasts = NULL; /* Context pointer for strtok_r() call */ char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */ /* Get the environment variable, if it exists */ @@ -877,7 +878,7 @@ h5_get_vfd_fapl(hid_t fapl) */ HDstrncpy(buf, env, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; - if(NULL == (tok = HDstrtok(buf, " \t\n\r"))) + if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts))) goto done; if(!HDstrcmp(tok, "sec2")) { @@ -936,7 +937,7 @@ h5_get_vfd_fapl(hid_t fapl) hsize_t fam_size = 100 * 1024 * 1024; /* 100 MB */ /* Was a family size specified in the environment variable? */ - if((tok = HDstrtok(NULL, " \t\n\r"))) + if((tok = HDstrtok_r(NULL, " \t\n\r", &lasts))) fam_size = (hsize_t)(HDstrtod(tok, NULL) * 1024 * 1024); if(H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT) < 0) goto error; @@ -945,7 +946,7 @@ h5_get_vfd_fapl(hid_t fapl) unsigned log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC; /* Were special log file flags specified in the environment variable? */ - if((tok = HDstrtok(NULL, " \t\n\r"))) + if((tok = HDstrtok_r(NULL, " \t\n\r", &lasts))) log_flags = (unsigned)HDstrtol(tok, NULL, 0); if(H5Pset_fapl_log(fapl, NULL, log_flags, (size_t)0) < 0) @@ -990,6 +991,7 @@ h5_get_libver_fapl(hid_t fapl) { const char *env = NULL; /* HDF5_DRIVER environment variable */ const char *tok = NULL; /* strtok pointer */ + char *lasts = NULL; /* Context pointer for strtok_r() call */ char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */ /* Get the environment variable, if it exists */ @@ -1012,7 +1014,7 @@ h5_get_libver_fapl(hid_t fapl) */ HDstrncpy(buf, env, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; - if(NULL == (tok = HDstrtok(buf, " \t\n\r"))) + if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts))) goto done; if(!HDstrcmp(tok, "latest")) { @@ -1053,6 +1055,7 @@ h5_get_vol_fapl(hid_t fapl) { const char *env = NULL; const char *tok = NULL; + char *lasts = NULL; /* Context pointer for strtok_r() call */ htri_t connector_is_registered; char buf[1024]; /* Buffer for tokenizing HDF5_VOL_CONNECTOR */ void *vol_info = NULL; /* VOL connector info */ @@ -1075,7 +1078,7 @@ h5_get_vol_fapl(hid_t fapl) */ HDstrncpy(buf, env, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; - if(NULL == (tok = HDstrtok(buf, " \t\n\r"))) + if(NULL == (tok = HDstrtok_r(buf, " \t\n\r", &lasts))) goto done; /* First, check to see if the connector is already registered */ @@ -1105,7 +1108,7 @@ h5_get_vol_fapl(hid_t fapl) } /* end else */ /* Was there any connector info specified in the environment variable? */ - if(NULL != (tok = HDstrtok(NULL, " \t\n\r"))) + if(NULL != (tok = HDstrtok_r(NULL, " \t\n\r", &lasts))) if(H5VLconnector_str_to_info(tok, connector_id, &vol_info) < 0) goto error; -- cgit v0.12 From c92f11b368215d97999c9a78e5b2e7b4cd73657f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 14 Dec 2018 08:12:25 -0600 Subject: HDFFV-10632 update new files --- MANIFEST | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MANIFEST b/MANIFEST index 6a1f53d..d840e73 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1389,6 +1389,7 @@ ./tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl ./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl ./tools/test/h5format_convert/testfiles/h5fc_d_file.ddl.err +./tools/test/h5format_convert/testfiles/h5fc_d_file-d.ddl ./tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl ./tools/test/h5format_convert/testfiles/h5fc_dname.ddl ./tools/test/h5format_convert/testfiles/h5fc_dname.err @@ -1527,6 +1528,7 @@ ./tools/test/misc/testfiles/h5clear_less_after_size.ddl ./tools/test/misc/testfiles/h5clear_less_before_size.ddl ./tools/test/misc/testfiles/h5clear_missing_file.ddl +./tools/test/misc/testfiles/h5clear_missing_file.err ./tools/test/misc/testfiles/h5clear_noclose_after_size.ddl ./tools/test/misc/testfiles/h5clear_noclose_before_size.ddl ./tools/test/misc/testfiles/h5clear_no_mdc_image.err -- cgit v0.12 From 74d167d738f719fc1076ed16360e9fd5b7ba4c98 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Fri, 14 Dec 2018 13:15:09 -0600 Subject: Make sure to free copy of VOL connector's name when H5VL_register_connector fails --- src/H5VLint.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/H5VLint.c b/src/H5VLint.c index 82886cd..147e996 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() */ -- cgit v0.12 From 9ae9b3ef513613bb2fca15f96461a156148c2627 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 15 Dec 2018 02:05:00 -0800 Subject: Moved the native VOL connector's optional enums to the public headers and renamed to include native/NATIVE in the name. --- src/H5Adeprec.c | 4 +- src/H5Apkg.h | 15 ------- src/H5Apublic.h | 16 ++++++++ src/H5D.c | 6 +-- src/H5Dio.c | 4 +- src/H5Dpkg.h | 9 ----- src/H5Dpublic.h | 10 +++++ src/H5F.c | 48 +++++++++++----------- src/H5Fdeprec.c | 4 +- src/H5Fint.c | 2 +- src/H5Fpkg.h | 29 -------------- src/H5Fpublic.h | 29 ++++++++++++++ src/H5Gdeprec.c | 10 ++--- src/H5Gpkg.h | 16 -------- src/H5Gpublic.h | 16 ++++++++ src/H5O.c | 14 +++---- src/H5Odeprec.c | 6 +-- src/H5Oprivate.h | 7 ---- src/H5Opublic.h | 7 ++++ src/H5VLnative.c | 118 ++++++++++++++++++++++++++++++++++--------------------- 20 files changed, 201 insertions(+), 169 deletions(-) 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 056a98b..19b4432 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -3695,7 +3695,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 2ea8c10..fce5db4 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/H5VLnative.c b/src/H5VLnative.c index 3fc1a7c..e511876 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -782,15 +782,15 @@ 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 = va_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 *); @@ -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: @@ -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 = va_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,7 +1266,7 @@ 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 *); @@ -1275,7 +1282,7 @@ 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 *); @@ -1293,7 +1300,7 @@ 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 *); @@ -1321,7 +1328,7 @@ 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 *); @@ -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 = va_arg(arguments, H5VL_native_file_optional_t); herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1773,7 +1780,7 @@ 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 */ @@ -1792,7 +1799,7 @@ 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 *); @@ -1805,7 +1812,7 @@ 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 *); @@ -1817,7 +1824,8 @@ 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 *); @@ -1830,8 +1838,8 @@ 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 *); @@ -1850,7 +1858,7 @@ 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 *); @@ -1861,7 +1869,7 @@ 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 *); @@ -1872,7 +1880,7 @@ 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 *); @@ -1891,7 +1899,7 @@ 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); @@ -1903,7 +1911,7 @@ 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 *); @@ -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,7 +1942,8 @@ 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 *); @@ -1944,7 +1953,8 @@ 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 *); @@ -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,7 +1993,8 @@ 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 *); @@ -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,7 +2030,8 @@ 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 *); @@ -2033,7 +2050,8 @@ 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 *); @@ -2045,7 +2063,8 @@ 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 rel_eoa; /* Relative address of EOA */ @@ -2069,7 +2088,8 @@ 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); haddr_t max_eof_eoa; /* Maximum of the relative EOA & EOF */ @@ -2090,7 +2110,8 @@ 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); @@ -2413,16 +2434,16 @@ 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 = va_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); @@ -2443,7 +2464,7 @@ 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); @@ -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: @@ -3282,7 +3312,7 @@ 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_native_object_optional_t optional_type = va_arg(arguments, H5VL_native_object_optional_t); H5VL_loc_params_t *loc_params = va_arg(arguments, H5VL_loc_params_t *); H5G_loc_t loc; /* Location of group */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3294,7 +3324,7 @@ 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); @@ -3342,7 +3372,7 @@ 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); @@ -3363,7 +3393,7 @@ 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 *); -- cgit v0.12 From 8f3a777a8ae45bac583fccead85c485fc54ebda8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Sat, 15 Dec 2018 06:25:02 -0600 Subject: Use H5I_INVALID_HID --- tools/test/h5jam/tellub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index 26c725d..aa779b3 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -104,7 +104,7 @@ main (int argc, const char *argv[]) hsize_t usize; htri_t testval; herr_t status; - hid_t plist = -1; + hid_t plist = H5I_INVALID_HID; h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); -- cgit v0.12 From e21dec94d85b02b6dd3b2020cf026414cea1eb0d Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 15 Dec 2018 18:17:16 -0800 Subject: Updated the passthru VOL connector: * snprintf --> sprintf (for Windows compat) * tabs --> spaces * removed spurious parens from returns * Changed the logging macro to something less clash-prone --- src/H5VLpassthru.c | 671 +++++++++++++++++++++++++++-------------------------- 1 file changed, 337 insertions(+), 334 deletions(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index a93ac9a..193c759 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,7 +39,7 @@ /* Whether to display log messge when callback is invoked */ /* (Uncomment to enable) */ -/* #define ENABLE_LOGGING */ +/* #define ENABLE_PASSTHRU_LOGGING */ /************/ @@ -161,7 +161,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 +252,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 +272,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 +295,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 +323,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 +331,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 +357,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 +385,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 +396,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 +409,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 +417,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 +430,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 +444,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 +460,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 +470,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 +482,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 +491,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 +504,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 +520,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 +536,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 +550,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 +580,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 +589,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 +599,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 +612,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 +623,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 +638,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 +647,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 +659,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 +670,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 +679,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 +689,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 +701,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 +723,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 +738,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 +760,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 +775,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 +796,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 +806,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 +827,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 +837,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 +858,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 +868,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 +889,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 +899,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 +908,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 +920,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 +930,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 +950,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 +964,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 +986,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 +1001,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 +1023,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 +1038,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 +1047,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 +1059,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 +1069,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 +1078,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 +1090,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 +1100,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 +1109,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 +1121,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 +1131,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 +1152,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 +1162,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 +1171,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 +1183,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 +1193,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 +1202,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 +1213,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 +1227,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 +1250,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 +1265,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 +1287,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 +1302,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 +1323,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 +1333,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 +1342,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 +1354,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 +1364,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 +1373,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 +1385,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 +1395,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 +1415,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 +1431,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 +1454,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 +1485,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 +1508,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 +1539,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 +1548,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 +1560,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 +1570,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 +1596,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 +1618,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 +1703,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 +1712,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 +1724,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 +1734,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 +1743,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 +1754,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 +1768,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 +1790,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 +1805,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 +1827,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 +1842,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 +1851,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 +1863,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 +1873,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 +1894,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 +1904,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 +1913,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 +1925,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 +1935,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 +1944,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 +1955,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 +1969,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 +1990,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 +2022,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 +2051,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 +2068,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 +2097,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 +2114,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 +2135,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 +2145,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 +2166,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 +2176,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 +2185,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 +2197,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 +2207,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 +2229,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 +2244,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 +2268,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 +2278,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 +2298,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 +2308,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 +2330,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 +2340,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 +2361,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 +2371,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 +2395,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 +2404,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 +2427,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 +2436,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 +2458,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 +2467,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 +2493,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 +2513,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 +2635,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 +2655,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 +2682,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 +2691,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() */ -- cgit v0.12 From 1b5190011bde5f2f47b01429cd97c11ade66f911 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 15 Dec 2018 20:02:37 -0800 Subject: Added #define to use strtok_s instead of strtok_r on Windows. --- src/H5win32defs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index 4522228..c5e41d4 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -62,6 +62,7 @@ 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) -- cgit v0.12 From 8dbadb41a3b23d6d74effee7bef0302fd81b80a6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 17 Dec 2018 11:16:59 -0600 Subject: HDFFV-10663 add new function H5Fis_accessible --- java/src/hdf/hdf5lib/H5.java | 19 +++++++++++++++++++ java/src/jni/h5fImp.c | 29 ++++++++++++++++++++++++++++- java/src/jni/h5fImp.h | 9 +++++++++ java/test/TestH5Fbasic.java | 13 +++++++++++++ java/test/TestH5Fparams.java | 5 +++++ java/test/testfiles/JUnit-TestH5Fbasic.txt | 3 ++- java/test/testfiles/JUnit-TestH5Fparams.txt | 3 ++- 7 files changed, 78 insertions(+), 3 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 1138e50..bce0034 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -3077,10 +3077,29 @@ public class H5 implements java.io.Serializable { * - Error from the HDF-5 Library. * @exception NullPointerException * - name is null. + * + * @deprecated As of HDF5 1.10.5 in favor of H5Fis_accessible. **/ public synchronized static native boolean H5Fis_hdf5(String name) throws HDF5LibraryException, NullPointerException; /** + * H5Fis_accessible determines if the file can be opened with the given fapl. + * + * @param name + * IN: File name to check. + * @param file_id + * IN: File identifier for a currently-open HDF5 file + * + * @return true if file is accessible, false if not. + * + * @exception HDF5LibraryException + * - Error from the HDF-5 Library. + * @exception NullPointerException + * - name is null. + **/ + public synchronized static native boolean H5Fis_accessible(String name, long file_id) throws HDF5LibraryException, NullPointerException; + + /** * H5Fmount mounts the file specified by child_id onto the group specified by loc_id and name using the mount * properties plist_id. * diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c index 9d68290..248e654 100644 --- a/java/src/jni/h5fImp.c +++ b/java/src/jni/h5fImp.c @@ -168,6 +168,33 @@ Java_hdf_hdf5lib_H5_H5Fis_1hdf5 /* * Class: hdf_hdf5lib_H5 + * Method: H5Fis_accessible + * Signature: (Ljava/lang/String;J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Fis_1accessible + (JNIEnv *env, jclass clss, jstring name, jlong file_id) +{ + htri_t bval = JNI_FALSE; + const char *fileName; + + PIN_JAVA_STRING(name, fileName); + if (fileName != NULL) { + bval = H5Fis_accessible(fileName, (hid_t)file_id); + + UNPIN_JAVA_STRING(name, fileName); + + if (bval > 0) + bval = JNI_TRUE; + else if (bval < 0) + h5libraryError(env); + } + + return (jboolean)bval; +} /* end Java_hdf_hdf5lib_H5_H5Fis_1accessible */ + +/* + * Class: hdf_hdf5lib_H5 * Method: H5Fget_create_plist * Signature: (J)J */ @@ -177,7 +204,7 @@ Java_hdf_hdf5lib_H5__1H5Fget_1create_1plist { hid_t retVal = -1; - retVal = H5Fget_create_plist((hid_t)file_id ); + retVal = H5Fget_create_plist((hid_t)file_id); if (retVal < 0) h5libraryError(env); diff --git a/java/src/jni/h5fImp.h b/java/src/jni/h5fImp.h index fcfdedf..af0fa1d 100644 --- a/java/src/jni/h5fImp.h +++ b/java/src/jni/h5fImp.h @@ -68,6 +68,15 @@ Java_hdf_hdf5lib_H5_H5Fis_1hdf5 /* * Class: hdf_hdf5lib_H5 + * Method: H5Fis_accessible + * Signature: (Ljava/lang/String;J)Z + */ +JNIEXPORT jboolean JNICALL +Java_hdf_hdf5lib_H5_H5Fis_1ccessible + (JNIEnv*, jclass, jstring, jlong); + +/* + * Class: hdf_hdf5lib_H5 * Method: H5Fget_create_plist * Signature: (J)J */ diff --git a/java/test/TestH5Fbasic.java b/java/test/TestH5Fbasic.java index 11d6644..a5afb6e 100644 --- a/java/test/TestH5Fbasic.java +++ b/java/test/TestH5Fbasic.java @@ -81,6 +81,19 @@ public class TestH5Fbasic { assertTrue(isH5 == true); } + @Test + public void testH5Fis_accessible() { + boolean isH5 = false; + + try { + isH5 = H5.H5Fis_accessible(H5_FILE, HDF5Constants.H5P_DEFAULT); + } + catch (Throwable err) { + fail("H5.H5Fis_accessible failed on " + H5_FILE + ": " + err); + } + assertTrue(isH5 == true); + } + @Test(expected = HDF5LibraryException.class) public void testH5Fcreate_EXCL() throws Throwable { H5.H5Fcreate(H5_FILE, HDF5Constants.H5F_ACC_EXCL, diff --git a/java/test/TestH5Fparams.java b/java/test/TestH5Fparams.java index fffded1..3d64aa9 100644 --- a/java/test/TestH5Fparams.java +++ b/java/test/TestH5Fparams.java @@ -60,6 +60,11 @@ public class TestH5Fparams { } @Test(expected = NullPointerException.class) + public void testH5Fis_accessible_null() throws Throwable { + H5.H5Fis_accessible(null, -1); + } + + @Test(expected = NullPointerException.class) public void testH5Fmount_null() throws Throwable { H5.H5Fmount(-1, null, -1, HDF5Constants.H5P_DEFAULT); } diff --git a/java/test/testfiles/JUnit-TestH5Fbasic.txt b/java/test/testfiles/JUnit-TestH5Fbasic.txt index 467e2fb..2654624 100644 --- a/java/test/testfiles/JUnit-TestH5Fbasic.txt +++ b/java/test/testfiles/JUnit-TestH5Fbasic.txt @@ -9,6 +9,7 @@ JUnit version 4.11 .testH5Freopen_closed .testH5Freset_mdc_hit_rate_stats .testH5Fget_name +.testH5Fis_accessible .testH5Fcreate .testH5Fclear_elink_file_cache .testH5Fclose_twice @@ -17,5 +18,5 @@ JUnit version 4.11 Time: XXXX -OK (15 tests) +OK (16 tests) diff --git a/java/test/testfiles/JUnit-TestH5Fparams.txt b/java/test/testfiles/JUnit-TestH5Fparams.txt index 9d35220..e91cbdc 100644 --- a/java/test/testfiles/JUnit-TestH5Fparams.txt +++ b/java/test/testfiles/JUnit-TestH5Fparams.txt @@ -1,4 +1,5 @@ JUnit version 4.11 +.testH5Fis_accessible_null .testH5Fcreate_null .testH5Fflush_local .testH5Fget_info @@ -13,5 +14,5 @@ JUnit version 4.11 Time: XXXX -OK (11 tests) +OK (12 tests) -- cgit v0.12 From 1b9326d37f5a932eb1646d970c08bf14cd188679 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 10:29:58 -0800 Subject: Added a work-around for va_copy() on pre-2013 versions of Visual Studio. --- src/H5win32defs.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index c5e41d4..ad8f4e8 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -66,6 +66,9 @@ typedef __int64 h5_stat_size_t; #define HDtzset() _tzset() #define HDunlink(S) _unlink(S) #define HDwrite(F,M,Z) _write(F,M,Z) +#if (_MSC_VER < 1800) +#define HDva_copy(D,S) ((D) = (S)) +#endif /* MSC_VER < 1800 */ #ifdef H5_HAVE_VISUAL_STUDIO -- cgit v0.12 From 6306766fb4f8012cdb5b74fd7d59e98b68c916f2 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 10:34:20 -0800 Subject: Added a helpful comment to the va_copy() Windows hack. --- src/H5win32defs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/H5win32defs.h b/src/H5win32defs.h index ad8f4e8..140afc3 100644 --- a/src/H5win32defs.h +++ b/src/H5win32defs.h @@ -67,6 +67,10 @@ typedef __int64 h5_stat_size_t; #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 */ -- cgit v0.12 From b0457117d867d9850d042d7c3f71a747899b932e Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 11:40:10 -0800 Subject: Further va_list improvements. --- src/H5VLcallback.c | 100 ++++++++++++++++++++++++++--------------------------- src/H5VLpassthru.c | 4 +++ src/H5private.h | 3 ++ 3 files changed, 57 insertions(+), 50 deletions(-) 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/H5VLpassthru.c b/src/H5VLpassthru.c index 193c759..bf81425 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -41,6 +41,10 @@ /* (Uncomment to enable) */ /* #define ENABLE_PASSTHRU_LOGGING */ +/* Windows missing va_copy() hack (from H5win2_defs.h) */ +#if (_MSC_VER < 1800) +#define va_copy(D,S) ((D) = (S)) +#endif /* MSC_VER < 1800 */ /************/ /* Typedefs */ diff --git a/src/H5private.h b/src/H5private.h index f48fa7b..f58faec 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1498,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 */ -- cgit v0.12 From 3214de79249ae87154b2527211463c76a4f684e3 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 13:30:31 -0800 Subject: Added HD to va_* calls in a couple of library files. --- src/H5system.c | 59 ++++++++++--------- src/H5trace.c | 180 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 122 insertions(+), 117 deletions(-) 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 d5aad06..1c7948c 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"); @@ -1409,7 +1409,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: @@ -1443,7 +1443,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: @@ -1490,7 +1490,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; @@ -1505,7 +1505,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: @@ -1600,7 +1600,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; @@ -1623,7 +1623,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: @@ -1670,7 +1670,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 */ @@ -1686,7 +1686,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 */ @@ -1701,7 +1701,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: @@ -1760,7 +1760,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 */ @@ -1776,7 +1776,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: @@ -1820,7 +1820,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; @@ -1844,7 +1844,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 */ @@ -1860,7 +1860,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: @@ -1902,7 +1902,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: @@ -1936,7 +1936,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: @@ -1994,7 +1994,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: @@ -2042,7 +2042,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 */ @@ -2058,7 +2058,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: @@ -2105,7 +2105,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: @@ -2135,7 +2135,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: @@ -2165,7 +2165,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: @@ -2199,7 +2199,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: @@ -2241,7 +2241,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: @@ -2279,7 +2279,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: @@ -2313,7 +2313,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: @@ -2383,7 +2383,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: @@ -2439,7 +2439,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"); @@ -2469,7 +2469,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; @@ -2493,7 +2493,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; @@ -2516,7 +2516,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: @@ -2551,7 +2551,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: @@ -2580,7 +2580,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"); @@ -2596,7 +2596,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: @@ -2634,7 +2634,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: @@ -2660,7 +2660,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: @@ -2683,7 +2683,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: @@ -2706,7 +2706,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: @@ -2741,7 +2741,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: @@ -2776,7 +2776,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: @@ -2799,7 +2799,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: @@ -2822,7 +2822,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: @@ -2848,7 +2848,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: @@ -2874,7 +2874,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: @@ -2900,7 +2900,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: @@ -2929,7 +2929,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: @@ -2964,7 +2964,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: @@ -3009,7 +3009,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); @@ -3035,7 +3035,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; @@ -3052,7 +3052,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: @@ -3082,7 +3082,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 */ @@ -3096,7 +3096,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"); @@ -3115,7 +3115,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"); @@ -3141,7 +3141,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; @@ -3169,7 +3169,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 { -- cgit v0.12 From 9f175afce8c08bf6193e45ce391e05e4198dd61c Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 14:03:11 -0800 Subject: Updated va_arg-->HDva_arg in the native VOL connector. --- src/H5VLnative.c | 358 +++++++++++++++++++++++++++---------------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/src/H5VLnative.c b/src/H5VLnative.c index e511876..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 */ @@ -787,15 +787,15 @@ H5VL__native_attr_optional(void H5_ATTR_UNUSED *obj, hid_t H5_ATTR_UNUSED dxpl_i FUNC_ENTER_STATIC - optional_type = va_arg(arguments, H5VL_native_attr_optional_t); + optional_type = HDva_arg(arguments, H5VL_native_attr_optional_t); switch(optional_type) { #ifndef H5_NO_DEPRECATED_SYMBOLS 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) @@ -1066,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") @@ -1077,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) @@ -1089,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") @@ -1100,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") @@ -1111,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") @@ -1122,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) @@ -1133,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); @@ -1173,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") @@ -1182,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) @@ -1193,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) @@ -1225,7 +1225,7 @@ 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_native_dataset_optional_t optional_type = va_arg(arguments, H5VL_native_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 @@ -1268,7 +1268,7 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, 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; @@ -1284,8 +1284,8 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, 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; @@ -1302,9 +1302,9 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, 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; @@ -1330,10 +1330,10 @@ H5VL__native_dataset_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, 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; @@ -1494,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; @@ -1511,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))) @@ -1527,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; @@ -1544,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; @@ -1563,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; @@ -1592,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))) @@ -1644,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 */ @@ -1677,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 */ @@ -1692,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) @@ -1711,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) @@ -1728,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) @@ -1741,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) @@ -1772,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_native_file_optional_t optional_type = va_arg(arguments, H5VL_native_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 @@ -1784,7 +1784,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR { 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) @@ -1801,9 +1801,9 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Fget_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) @@ -1815,7 +1815,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR 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) @@ -1827,10 +1827,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -1841,8 +1841,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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. @@ -1860,7 +1860,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Fget_mdc_config */ 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) @@ -1871,7 +1871,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Fget_mdc_hit_rate */ 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) @@ -1882,10 +1882,10 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Fget_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 */ @@ -1901,8 +1901,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Fget_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) @@ -1913,8 +1913,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* H5Iget_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") @@ -1945,7 +1945,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -1956,7 +1956,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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") @@ -1996,8 +1996,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -2033,11 +2033,11 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -2053,8 +2053,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -2066,7 +2066,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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 */ @@ -2091,7 +2091,7 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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.*/ @@ -2113,8 +2113,8 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR /* 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) @@ -2317,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) @@ -2328,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) @@ -2392,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) @@ -2403,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) @@ -2439,17 +2439,17 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, FUNC_ENTER_STATIC - optional_type = va_arg(arguments, H5VL_native_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_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 */ @@ -2466,9 +2466,9 @@ H5VL__native_group_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, /* H5Gget_objinfo (deprecated) */ 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 */ @@ -2781,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 */ @@ -2801,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, @@ -2816,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 */ @@ -2869,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) @@ -2884,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) @@ -3105,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 */ @@ -3124,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) @@ -3137,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) @@ -3152,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) @@ -3197,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) @@ -3209,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 */ @@ -3223,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) { @@ -3247,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) @@ -3258,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 */ @@ -3270,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)))) @@ -3312,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_native_object_optional_t optional_type = va_arg(arguments, H5VL_native_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 */ @@ -3326,8 +3326,8 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, /* H5Oget_info / H5Oget_info_by_name / H5Oget_info_by_idx */ 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 */ @@ -3374,9 +3374,9 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, /* H5Oget_comment / H5Oget_comment_by_name */ 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 */ @@ -3395,7 +3395,7 @@ H5VL__native_object_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, /* H5Oset_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 */ @@ -3556,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") @@ -3570,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"); @@ -3608,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) @@ -3619,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) -- cgit v0.12 From a71b77433ccf313086f326e72bb7055d94dec3d2 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 14:33:33 -0800 Subject: Fixed an issue in the passthru Windows va_copy hack. --- src/H5VLpassthru.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index bf81425..82c18af 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -42,9 +42,9 @@ /* #define ENABLE_PASSTHRU_LOGGING */ /* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if (_MSC_VER < 1800) +#if defined(_WIN32) && (_MSC_VER < 1800) #define va_copy(D,S) ((D) = (S)) -#endif /* MSC_VER < 1800 */ +#endif /* defined(_WIN32) && (_MSC_VER < 1800) */ /************/ /* Typedefs */ -- cgit v0.12 From a7618f432b671ad041ae63a83bf9b9bb08096dbe Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 17 Dec 2018 14:48:39 -0800 Subject: Updated with extra sanity check and improved comment. --- src/H5VLpassthru.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index 82c18af..49102d7 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -41,10 +41,12 @@ /* (Uncomment to enable) */ /* #define ENABLE_PASSTHRU_LOGGING */ -/* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if defined(_WIN32) && (_MSC_VER < 1800) +/* 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 /* defined(_WIN32) && (_MSC_VER < 1800) */ +#endif /************/ /* Typedefs */ -- cgit v0.12 From c6831c7a75a5d0c1ca82a03c96fc0f023d1bc52e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 17 Dec 2018 17:25:10 -0600 Subject: Remove H5VL_FILE_CACHE_VOL_CONN from file specific callbacks, as it turns out not to be necessary. Also, correct _MSC_VER #ifdef --- src/H5Fint.c | 15 +++++++++++++-- src/H5Fpkg.h | 1 - src/H5VLcallback.c | 46 ---------------------------------------------- src/H5VLnative.c | 12 ------------ src/H5VLpassthru.c | 2 +- src/H5VLpublic.h | 3 +-- src/H5trace.c | 3 --- 7 files changed, 15 insertions(+), 67 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index 19b4432..734949a 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -74,6 +74,7 @@ typedef struct H5F_olist_t { /* Local Prototypes */ /********************/ +static herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info); static herr_t H5F__get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr); static int H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key); static herr_t H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out*/); @@ -115,13 +116,13 @@ H5FL_DEFINE(H5F_file_t); * *------------------------------------------------------------------------- */ -herr_t +static herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info) { void *new_connector_info = NULL; /* Copy of connector info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE + FUNC_ENTER_STATIC /* Sanity check */ HDassert(file); @@ -1090,6 +1091,16 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_ if(H5P_get(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get object flush cb info") + /* Get the VOL connector info */ + { + H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */ + + if(H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get VOL connector info") + if(H5F__set_vol_conn(f, connector_prop.connector_id, connector_prop.connector_info) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't cache VOL connector info") + } /* end block */ + /* Create a metadata cache with the specified number of elements. * The cache might be created with a different number of elements and * the access property list should be updated to reflect that. diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index e5bb28f..4ad2c55 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -411,7 +411,6 @@ H5_DLL herr_t H5F__close(H5F_t *f); H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high); H5_DLL H5F_t *H5F__get_file(void *obj, H5I_type_t type); H5_DLL hid_t H5F__get_file_id(H5F_t *file); -H5_DLL herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info); /* File mount related routines */ H5_DLL herr_t H5F__mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id); diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c index 6e19e07..811162d 100644 --- a/src/H5VLcallback.c +++ b/src/H5VLcallback.c @@ -95,8 +95,6 @@ static herr_t H5VL__dataset_optional(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req, va_list arguments); static herr_t H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, void **req); -static herr_t H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, - hid_t dxpl_id, void **req, ...); static void * H5VL__file_create(const H5VL_class_t *cls, const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req); static void * H5VL__file_open(const H5VL_class_t *cls, const char *name, @@ -2596,42 +2594,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5VL__file_cache_connector - * - * Purpose: Wrap varargs and reissue 'cache VOL connector' operation - * to file specific call - * - * Return: Success: Non-negative - * Failure: Negative - * - *------------------------------------------------------------------------- - */ -static herr_t -H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, hid_t dxpl_id, - void **req, ...) -{ - va_list arguments; /* Argument list passed from the API call */ - hbool_t arg_started = FALSE; /* Whether the va_list has been started */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC - - /* Re-issue call to internal file specific callback routine */ - 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") - -done: - /* End access to the va_list, if we started it */ - if(arg_started) - HDva_end(arguments); - - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5VL__file_cache_connector() */ - - -/*------------------------------------------------------------------------- * Function: H5VL__file_create * * Purpose: Creates a file through the VOL @@ -2695,10 +2657,6 @@ H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name, if(NULL == (ret_value = H5VL__file_create(cls, name, flags, fcpl_id, fapl_id, dxpl_id, req))) HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed") - /* Cache the connector ID & info */ - if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed") - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_file_create() */ @@ -2806,10 +2764,6 @@ H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name, if(NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req))) HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed") - /* Cache the connector ID & info */ - if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0) - HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed") - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_file_open() */ diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 0339205..4e6af18 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -1738,18 +1738,6 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type, break; } - /* H5Fcreate / H5Fopen */ - case H5VL_FILE_CACHE_VOL_CONN: - { - 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) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cache VOL connector ID & info failed") - break; - } - default: HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation") } /* end switch */ diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index bf81425..9361273 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -42,7 +42,7 @@ /* #define ENABLE_PASSTHRU_LOGGING */ /* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if (_MSC_VER < 1800) +#if defined(_MSC_VER) && (_MSC_VER < 1800) #define va_copy(D,S) ((D) = (S)) #endif /* MSC_VER < 1800 */ diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h index b276128..22cf12b 100644 --- a/src/H5VLpublic.h +++ b/src/H5VLpublic.h @@ -124,8 +124,7 @@ typedef enum H5VL_file_specific_t { H5VL_FILE_REOPEN, /* Reopen the file */ H5VL_FILE_MOUNT, /* Mount a file */ H5VL_FILE_UNMOUNT, /* Unmount a file */ - H5VL_FILE_IS_ACCESSIBLE, /* Check if a file is accessible */ - H5VL_FILE_CACHE_VOL_CONN /* Cache VOL connector ID & info */ + H5VL_FILE_IS_ACCESSIBLE /* Check if a file is accessible */ } H5VL_file_specific_t; /* types for group GET callback */ diff --git a/src/H5trace.c b/src/H5trace.c index 1c7948c..7d64c8e 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -2759,9 +2759,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...) case H5VL_FILE_IS_ACCESSIBLE: HDfprintf(out, "H5VL_FILE_IS_ACCESSIBLE"); break; - case H5VL_FILE_CACHE_VOL_CONN: - HDfprintf(out, "H5VL_FILE_CACHE_VOL_CONN"); - break; default: HDfprintf(out, "%ld", (long)specific); break; -- cgit v0.12 From 3597bd469ff0073134b31765d9b87660cd3e0039 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 17 Dec 2018 17:28:51 -0600 Subject: Revert change to MSC_VER, in favor of Dana's --- src/H5VLpassthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c index 9361273..bf81425 100644 --- a/src/H5VLpassthru.c +++ b/src/H5VLpassthru.c @@ -42,7 +42,7 @@ /* #define ENABLE_PASSTHRU_LOGGING */ /* Windows missing va_copy() hack (from H5win2_defs.h) */ -#if defined(_MSC_VER) && (_MSC_VER < 1800) +#if (_MSC_VER < 1800) #define va_copy(D,S) ((D) = (S)) #endif /* MSC_VER < 1800 */ -- cgit v0.12