summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5copy/CMakeLists.txt2
-rw-r--r--tools/test/h5copy/h5copygentest.c54
-rw-r--r--tools/test/h5diff/CMakeLists.txt2
-rw-r--r--tools/test/h5diff/h5diffgentest.c2
-rw-r--r--tools/test/h5dump/CMakeLists.txt2
-rw-r--r--tools/test/h5jam/getub.c18
-rw-r--r--tools/test/h5jam/tellub.c12
-rw-r--r--tools/test/h5ls/CMakeLists.txt2
-rw-r--r--tools/test/h5repack/CMakeLists.txt4
-rw-r--r--tools/test/h5repack/h5repacktst.c108
-rw-r--r--tools/test/misc/vds/UC_common.h11
-rw-r--r--tools/test/perform/direct_write_perf.c24
-rw-r--r--tools/test/perform/iopipe.c2
-rw-r--r--tools/test/perform/perf.c37
-rw-r--r--tools/test/perform/pio_perf.c296
-rw-r--r--tools/test/perform/pio_standalone.c58
-rw-r--r--tools/test/perform/pio_standalone.h72
-rw-r--r--tools/test/perform/sio_perf.c356
-rw-r--r--tools/test/perform/sio_standalone.c58
-rw-r--r--tools/test/perform/sio_standalone.h72
-rw-r--r--tools/test/perform/zip_perf.c132
21 files changed, 638 insertions, 686 deletions
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index f76a65e..f63eb84 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -32,7 +32,7 @@ if (BUILD_SHARED_LIBS)
add_library (${H5COPY_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c)
target_include_directories (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5COPY_TOOL_PLUGIN_LIB_TARGET} SHARED)
- target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5COPY_TOOL_PLUGIN_LIB_TARGET} ${H5COPY_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index 429ad42..6898839 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -513,21 +513,21 @@ gen_obj_ref(hid_t loc_id)
* add dataset */
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -539,7 +539,7 @@ gen_obj_ref(hid_t loc_id)
* add group */
oid = H5Gcreate2(loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -547,34 +547,34 @@ gen_obj_ref(hid_t loc_id)
status = H5Rcreate(&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
sid = H5Screate_simple(1, dims2, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -613,7 +613,7 @@ gen_region_ref(hid_t loc_id)
sid = H5Screate_simple(2, dims2, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -621,7 +621,7 @@ gen_region_ref(hid_t loc_id)
/* create normal dataset which is refered */
oid2 = H5Dcreate2(loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -629,7 +629,7 @@ gen_region_ref(hid_t loc_id)
/* write values to dataset */
status = H5Dwrite(oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -637,7 +637,7 @@ gen_region_ref(hid_t loc_id)
/* select elements space for reference */
status = H5Sselect_elements(sid, H5S_SELECT_SET, 4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -645,7 +645,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from elements space */
status = H5Rcreate(&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -653,7 +653,7 @@ gen_region_ref(hid_t loc_id)
/* select hyperslab space for reference */
status = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -661,7 +661,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from hyperslab space */
status = H5Rcreate(&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -671,7 +671,7 @@ gen_region_ref(hid_t loc_id)
/* Create dataspace. */
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -679,7 +679,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference dataset */
oid1 = H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid1 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -687,7 +687,7 @@ gen_region_ref(hid_t loc_id)
/* write data as region references */
status = H5Dwrite(oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -816,7 +816,7 @@ gen_extlink_trg(hid_t loc_id)
* target file */
gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -831,7 +831,7 @@ gen_extlink_trg(hid_t loc_id)
tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -864,7 +864,7 @@ gen_extlink_src(hid_t loc_id)
*------------------------------------------------------------------------*/
gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -875,7 +875,7 @@ gen_extlink_src(hid_t loc_id)
/* link to dataset */
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -883,7 +883,7 @@ gen_extlink_src(hid_t loc_id)
/* link to group */
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -892,7 +892,7 @@ gen_extlink_src(hid_t loc_id)
status =
H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -900,7 +900,7 @@ gen_extlink_src(hid_t loc_id)
/* dangling link - no obj*/
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -908,7 +908,7 @@ gen_extlink_src(hid_t loc_id)
/* dangling link - no file */
status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index 9349ace..f74db0f 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -32,7 +32,7 @@ if (BUILD_SHARED_LIBS)
add_library (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c)
target_include_directories (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED)
- target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} ${H5DIFF_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c
index f03254e..118a3a7 100644
--- a/tools/test/h5diff/h5diffgentest.c
+++ b/tools/test/h5diff/h5diffgentest.c
@@ -112,7 +112,7 @@ size_t H5TOOLS_MALLOCSIZE = (128 * 1024 * 1024);
#define SPACE1_DIM2 0
/* Error macros */
-#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
+#define AT() HDprintf("ERROR at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define PROGRAM_ERROR \
do { \
AT(); \
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index 242465e..a7b4846 100644
--- a/tools/test/h5dump/CMakeLists.txt
+++ b/tools/test/h5dump/CMakeLists.txt
@@ -12,7 +12,7 @@ if (BUILD_SHARED_LIBS)
add_library (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c)
target_include_directories (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} SHARED)
- target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} ${H5DUMP_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5jam/getub.c b/tools/test/h5jam/getub.c
index a9b4437..fd21d6c 100644
--- a/tools/test/h5jam/getub.c
+++ b/tools/test/h5jam/getub.c
@@ -21,9 +21,9 @@ void parse_command_line(int argc, const char *argv[]);
#define PROGRAM_NAME "getub"
char *nbytes = NULL;
-static const char * s_opts = "c:"; /* add more later ? */
-static struct long_options l_opts[] = {{"c", require_arg, 'c'}, /* input file */
- {NULL, 0, '\0'}};
+static const char * s_opts = "c:"; /* add more later ? */
+static struct h5_long_options l_opts[] = {{"c", require_arg, 'c'}, /* input file */
+ {NULL, 0, '\0'}};
/*-------------------------------------------------------------------------
* Function: usage
@@ -57,10 +57,10 @@ parse_command_line(int argc, const char *argv[])
int opt;
/* parse command line options */
- while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'c':
- nbytes = HDstrdup(opt_arg);
+ nbytes = HDstrdup(H5_optarg);
break;
case '?':
default:
@@ -69,7 +69,7 @@ parse_command_line(int argc, const char *argv[])
} /* end switch */
} /* end while */
- if (argc <= opt_ind) {
+ if (argc <= H5_optind) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
HDexit(EXIT_FAILURE);
@@ -100,16 +100,16 @@ main(int argc, const char *argv[])
goto error;
} /* end if */
- if (argc <= (opt_ind)) {
+ if (argc <= (H5_optind)) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
goto error;
} /* end if */
- filename = HDstrdup(argv[opt_ind]);
+ filename = HDstrdup(argv[H5_optind]);
size = 0;
- if (EOF == (res = sscanf(nbytes, "%u", &size))) {
+ if (EOF == (res = HDsscanf(nbytes, "%u", &size))) {
/* fail */
error_msg("missing file name\n");
usage(h5tools_getprogname());
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c
index 45d4af4..e6769ec 100644
--- a/tools/test/h5jam/tellub.c
+++ b/tools/test/h5jam/tellub.c
@@ -24,8 +24,8 @@
* parameters. The long-named ones can be partially spelled. When
* adding more, make sure that they don't clash with each other.
*/
-static const char * s_opts = "h";
-static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {NULL, 0, '\0'}};
+static const char * s_opts = "h";
+static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {NULL, 0, '\0'}};
/*-------------------------------------------------------------------------
* Function: usage
@@ -61,7 +61,7 @@ parse_command_line(int argc, const char *argv[])
int opt;
/* parse command line options */
- while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'h':
usage(h5tools_getprogname());
@@ -75,7 +75,7 @@ parse_command_line(int argc, const char *argv[])
}
/* check for file name to be processed */
- if (argc <= opt_ind) {
+ if (argc <= H5_optind) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
h5tools_setstatus(EXIT_FAILURE);
@@ -118,14 +118,14 @@ main(int argc, const char *argv[])
/* enable error reporting if command line option */
h5tools_error_report();
- if (argc <= (opt_ind)) {
+ if (argc <= (H5_optind)) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- ifname = HDstrdup(argv[opt_ind]);
+ ifname = HDstrdup(argv[H5_optind]);
testval = H5Fis_accessible(ifname, H5P_DEFAULT);
diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt
index ee223b8..ba6e468 100644
--- a/tools/test/h5ls/CMakeLists.txt
+++ b/tools/test/h5ls/CMakeLists.txt
@@ -12,7 +12,7 @@ if (BUILD_SHARED_LIBS)
add_library (${H5LS_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c)
target_include_directories (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5LS_TOOL_PLUGIN_LIB_TARGET} SHARED)
- target_link_libraries (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5LS_TOOL_PLUGIN_LIB_TARGET} ${H5LS_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index 26db85a..0b90750 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -54,13 +54,13 @@ if (BUILD_SHARED_LIBS)
add_library (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
target_include_directories (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} SHARED)
- target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5REPACK_TOOL_PLUGIN_LIB_TARGET} ${H5REPACK_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
add_library (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c)
target_include_directories (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} SHARED)
- target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} ${H5REPACK_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 3396217..acad74e 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -6058,7 +6058,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to dset */
status = H5Rcreate(&data_attr_objref[0], file_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6066,7 +6066,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to group */
status = H5Rcreate(&data_attr_objref[1], file_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6074,7 +6074,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* ref to datatype */
status = H5Rcreate(&data_attr_objref[2], file_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6082,7 +6082,7 @@ add_attr_with_objref(hid_t file_id, hid_t obj_id)
/* create attr with obj ref type */
status = make_attr(obj_id, 1, dim_attr_objref, "Attr_OBJREF", H5T_STD_REF_OBJ, data_attr_objref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6122,7 +6122,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
*/
sid_regrefed_dset = H5Screate_simple(2, dim_regrefed_dset, NULL);
if (sid_regrefed_dset < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6130,7 +6130,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* select elements space for reference */
status = H5Sselect_elements(sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6138,7 +6138,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* create region reference from elements space */
status = H5Rcreate(&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6146,7 +6146,7 @@ add_attr_with_regref(hid_t file_id, hid_t obj_id)
/* create attr with region ref type */
status = make_attr(obj_id, 1, dim_attr_regref, "Attr_REGREF", H5T_STD_REF_DSETREG, data_attr_regref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6191,21 +6191,21 @@ gen_refered_objs(hid_t loc_id)
*/
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
did1 = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did1 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6216,7 +6216,7 @@ gen_refered_objs(hid_t loc_id)
*/
gid = H5Gcreate2(loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6228,7 +6228,7 @@ gen_refered_objs(hid_t loc_id)
tid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6239,7 +6239,7 @@ gen_refered_objs(hid_t loc_id)
*/
sid2 = H5Screate_simple(2, dims2, NULL);
if (sid2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6247,7 +6247,7 @@ gen_refered_objs(hid_t loc_id)
/* create normal dataset which is refered */
did2 = H5Dcreate2(loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (did2 < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6255,7 +6255,7 @@ gen_refered_objs(hid_t loc_id)
/* write values to dataset */
status = H5Dwrite(did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6311,7 +6311,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to dataset */
status = H5Rcreate(&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6319,7 +6319,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to group */
status = H5Rcreate(&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6327,7 +6327,7 @@ gen_obj_ref(hid_t loc_id)
/* obj ref to named-datatype */
status = H5Rcreate(&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6337,21 +6337,21 @@ gen_obj_ref(hid_t loc_id)
*/
sid = H5Screate_simple(1, dims_dset_objref, NULL);
if (sid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
oid = H5Dcreate2(loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6363,7 +6363,7 @@ gen_obj_ref(hid_t loc_id)
/* add attribute with obj ref */
status = add_attr_with_objref(loc_id, oid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6371,7 +6371,7 @@ gen_obj_ref(hid_t loc_id)
/* add attribute with region ref */
status = add_attr_with_regref(loc_id, oid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6423,7 +6423,7 @@ gen_region_ref(hid_t loc_id)
sid_trg = H5Screate_simple(2, dims_trg, NULL);
if (sid_trg < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6431,7 +6431,7 @@ gen_region_ref(hid_t loc_id)
/* select elements space for reference */
status = H5Sselect_elements(sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6439,7 +6439,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from elements space */
status = H5Rcreate(&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6447,7 +6447,7 @@ gen_region_ref(hid_t loc_id)
/* select hyperslab space for reference */
status = H5Sselect_hyperslab(sid_trg, H5S_SELECT_SET, start, stride, count, block);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6455,7 +6455,7 @@ gen_region_ref(hid_t loc_id)
/* create region reference from hyperslab space */
status = H5Rcreate(&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6463,7 +6463,7 @@ gen_region_ref(hid_t loc_id)
/* Create dataspace. */
sid_ref = H5Screate_simple(1, dims1, NULL);
if (sid_ref < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6472,7 +6472,7 @@ gen_region_ref(hid_t loc_id)
oid_ref =
H5Dcreate2(loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid_ref < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6480,7 +6480,7 @@ gen_region_ref(hid_t loc_id)
/* write data as region references */
status = H5Dwrite(oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6492,7 +6492,7 @@ gen_region_ref(hid_t loc_id)
/* add attribute with obj ref */
status = add_attr_with_objref(loc_id, oid_ref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6500,7 +6500,7 @@ gen_region_ref(hid_t loc_id)
/* add attribute with region ref */
status = add_attr_with_regref(loc_id, oid_ref);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6667,7 +6667,7 @@ make_complex_attr_references(hid_t loc_id)
objdid = H5Dcreate2(loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, objsid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6676,7 +6676,7 @@ make_complex_attr_references(hid_t loc_id)
objtid = H5Tcopy(H5T_NATIVE_INT);
status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6687,7 +6687,7 @@ make_complex_attr_references(hid_t loc_id)
* compound type which contain obj and region reference */
main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (main_gid < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6702,7 +6702,7 @@ make_complex_attr_references(hid_t loc_id)
status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6725,7 +6725,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to dataset */
status = H5Rcreate(&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6734,7 +6734,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to group */
status = H5Rcreate(&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6743,7 +6743,7 @@ make_complex_attr_references(hid_t loc_id)
/* references to datatype */
status = H5Rcreate(&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6757,7 +6757,7 @@ make_complex_attr_references(hid_t loc_id)
H5Acreate2(main_did, "Comp_OBJREF", comp_objref_tid, comp_objref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(comp_objref_aid, comp_objref_tid, comp_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6778,13 +6778,13 @@ make_complex_attr_references(hid_t loc_id)
*/
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6798,7 +6798,7 @@ make_complex_attr_references(hid_t loc_id)
H5Acreate2(main_did, "Comp_REGREF", comp_regref_tid, comp_regref_attr_sid, H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(comp_regref_aid, comp_regref_tid, comp_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6823,7 +6823,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6831,7 +6831,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6839,7 +6839,7 @@ make_complex_attr_references(hid_t loc_id)
status =
H5Rcreate(&((hobj_ref_t *)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6857,7 +6857,7 @@ make_complex_attr_references(hid_t loc_id)
H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6865,7 +6865,7 @@ make_complex_attr_references(hid_t loc_id)
/* close resource for vlen data */
status = H5Treclaim(vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6885,14 +6885,14 @@ make_complex_attr_references(hid_t loc_id)
*/
status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate(&((hdset_reg_ref_t *)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1,
H5R_DATASET_REGION, objsid);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6910,7 +6910,7 @@ make_complex_attr_references(hid_t loc_id)
H5P_DEFAULT, H5P_DEFAULT);
status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
@@ -6918,7 +6918,7 @@ make_complex_attr_references(hid_t loc_id)
/* close resource for vlen data */
status = H5Treclaim(vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data);
if (status < 0) {
- HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", FUNC, __LINE__);
+ HDfprintf(stderr, "Error: %s %d> H5Treclaim failed.\n", __func__, __LINE__);
ret = FAIL;
goto out;
}
diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h
index bfa1ed9..d84d545 100644
--- a/tools/test/misc/vds/UC_common.h
+++ b/tools/test/misc/vds/UC_common.h
@@ -14,15 +14,6 @@
#ifndef USE_CASE_COMMON_H
#define USE_CASE_COMMON_H
-/* Use FUNC to safely handle variations of C99 __func__ keyword handling */
-#ifdef H5_HAVE_C99_FUNC
-#define FUNC __func__
-#elif defined(H5_HAVE_FUNCTION)
-#define FUNC __FUNCTION__
-#else
-#error "We need __func__ or __FUNCTION__ to test function names!"
-#endif
-
/******************************************
* Symbols used across multiple use cases *
******************************************/
@@ -41,7 +32,7 @@
#define FALSE 0
/* Testing macros */
-#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
+#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define UC_ERROR \
{ \
puts("*ERROR*"); \
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index 6537215..371c4f9 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -28,23 +28,22 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-
-#ifdef H5_HAVE_UNISTD_H
-#include <sys/types.h>
-#include <unistd.h>
-#endif
+#include <time.h>
#ifdef H5_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if defined(H5_TIME_WITH_SYS_TIME)
-#include <sys/time.h>
-#include <time.h>
-#elif defined(H5_HAVE_SYS_TIME_H)
+#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
+#endif
+
+#ifdef H5_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef H5_HAVE_UNISTD_H
+#include <unistd.h>
#endif
const char *FILENAME[] = {"direct_write", "unix.raw", NULL};
@@ -52,8 +51,7 @@ const char *FILENAME[] = {"direct_write", "unix.raw", NULL};
/*
* Print the current location on the standard output stream.
*/
-#define FUNC __func__
-#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, FUNC);
+#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define H5_FAILED() \
{ \
puts("*FAILED*"); \
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index d0db06a..2aa9e25 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -95,7 +95,6 @@ print_stats(const char *prefix,
static void
synchronize(void)
{
-#ifdef H5_HAVE_SYSTEM
#if defined(H5_HAVE_WIN32_API) && !defined(__CYGWIN__)
_flushall();
#else
@@ -107,7 +106,6 @@ synchronize(void)
status = HDsystem("df >/dev/null");
HDassert(status >= 0);
#endif
-#endif
}
/*-------------------------------------------------------------------------
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index a06fb77..875f932 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -31,23 +31,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#ifdef H5_HAVE_UNISTD_H
-#include <sys/types.h>
-#include <unistd.h>
-#endif
+#include <time.h>
#ifdef H5_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if defined(H5_TIME_WITH_SYS_TIME)
-#include <sys/time.h>
-#include <time.h>
-#elif defined(H5_HAVE_SYS_TIME_H)
+#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
-#else
-#include <time.h>
+#endif
+
+#ifdef H5_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef H5_HAVE_UNISTD_H
+#include <unistd.h>
#endif
#include <mpi.h>
@@ -136,12 +135,11 @@ main(int argc, char **argv)
if (mynod == 0)
printf("# Using hdf5-io calls.\n");
- /* kindof a weird hack- if the location of the pvfstab file was
- * specified on the command line, then spit out this location into
- * the appropriate environment variable: */
-
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
+#ifdef H5_HAVE_UNISTD_H
+ /* Kind of a weird hack- if the location of the pvfstab file was
+ * specified on the command line, then spit out this location into
+ * the appropriate environment variable.
+ */
if (opt_pvfstab_set) {
if ((setenv("PVFSTAB_FILE", opt_pvfstab, 1)) < 0) {
perror("setenv");
@@ -372,9 +370,8 @@ main(int argc, char **argv)
die_jar_jar_die:
-#if H5_HAVE_SETENV
- /* no setenv or unsetenv */
- /* clear the environment variable if it was set earlier */
+#ifdef H5_HAVE_UNISTD
+ /* Clear the environment variable if it was set earlier */
if (opt_pvfstab_set) {
unsetenv("PVFSTAB_FILE");
}
diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c
index 6fb5043..d38c574 100644
--- a/tools/test/perform/pio_perf.c
+++ b/tools/test/perform/pio_perf.c
@@ -123,12 +123,12 @@ static const char *s_opts = "a:A:B:cCd:D:e:F:ghi:Imno:p:P:stT:wx:X:";
#else
static const char *s_opts = "a:A:bB:cCd:D:e:F:ghi:Imno:p:P:stT:wx:X:";
#endif /* 1 */
-static struct long_options l_opts[] = {{"align", require_arg, 'a'},
- {"alig", require_arg, 'a'},
- {"ali", require_arg, 'a'},
- {"al", require_arg, 'a'},
- {"api", require_arg, 'A'},
- {"ap", require_arg, 'A'},
+static struct h5_long_options l_opts[] = {{"align", require_arg, 'a'},
+ {"alig", require_arg, 'a'},
+ {"ali", require_arg, 'a'},
+ {"al", require_arg, 'a'},
+ {"api", require_arg, 'A'},
+ {"ap", require_arg, 'A'},
#if 0
/* a sighting of the elusive binary option */
{ "binary", no_arg, 'b' },
@@ -137,133 +137,133 @@ static struct long_options l_opts[] = {{"align", require_arg, 'a'},
{ "bin", no_arg, 'b' },
{ "bi", no_arg, 'b' },
#endif /* 0 */
- {"block-size", require_arg, 'B'},
- {"block-siz", require_arg, 'B'},
- {"block-si", require_arg, 'B'},
- {"block-s", require_arg, 'B'},
- {"block-", require_arg, 'B'},
- {"block", require_arg, 'B'},
- {"bloc", require_arg, 'B'},
- {"blo", require_arg, 'B'},
- {"bl", require_arg, 'B'},
- {"chunk", no_arg, 'c'},
- {"chun", no_arg, 'c'},
- {"chu", no_arg, 'c'},
- {"ch", no_arg, 'c'},
- {"collective", no_arg, 'C'},
- {"collectiv", no_arg, 'C'},
- {"collecti", no_arg, 'C'},
- {"collect", no_arg, 'C'},
- {"collec", no_arg, 'C'},
- {"colle", no_arg, 'C'},
- {"coll", no_arg, 'C'},
- {"col", no_arg, 'C'},
- {"co", no_arg, 'C'},
- {"debug", require_arg, 'D'},
- {"debu", require_arg, 'D'},
- {"deb", require_arg, 'D'},
- {"de", require_arg, 'D'},
- {"geometry", no_arg, 'g'},
- {"geometr", no_arg, 'g'},
- {"geomet", no_arg, 'g'},
- {"geome", no_arg, 'g'},
- {"geom", no_arg, 'g'},
- {"geo", no_arg, 'g'},
- {"ge", no_arg, 'g'},
- {"help", no_arg, 'h'},
- {"hel", no_arg, 'h'},
- {"he", no_arg, 'h'},
- {"interleaved", require_arg, 'I'},
- {"interleave", require_arg, 'I'},
- {"interleav", require_arg, 'I'},
- {"interlea", require_arg, 'I'},
- {"interle", require_arg, 'I'},
- {"interl", require_arg, 'I'},
- {"inter", require_arg, 'I'},
- {"inte", require_arg, 'I'},
- {"int", require_arg, 'I'},
- {"in", require_arg, 'I'},
- {"max-num-processes", require_arg, 'P'},
- {"max-num-processe", require_arg, 'P'},
- {"max-num-process", require_arg, 'P'},
- {"max-num-proces", require_arg, 'P'},
- {"max-num-proce", require_arg, 'P'},
- {"max-num-proc", require_arg, 'P'},
- {"max-num-pro", require_arg, 'P'},
- {"max-num-pr", require_arg, 'P'},
- {"max-num-p", require_arg, 'P'},
- {"min-num-processes", require_arg, 'p'},
- {"min-num-processe", require_arg, 'p'},
- {"min-num-process", require_arg, 'p'},
- {"min-num-proces", require_arg, 'p'},
- {"min-num-proce", require_arg, 'p'},
- {"min-num-proc", require_arg, 'p'},
- {"min-num-pro", require_arg, 'p'},
- {"min-num-pr", require_arg, 'p'},
- {"min-num-p", require_arg, 'p'},
- {"max-xfer-size", require_arg, 'X'},
- {"max-xfer-siz", require_arg, 'X'},
- {"max-xfer-si", require_arg, 'X'},
- {"max-xfer-s", require_arg, 'X'},
- {"max-xfer", require_arg, 'X'},
- {"max-xfe", require_arg, 'X'},
- {"max-xf", require_arg, 'X'},
- {"max-x", require_arg, 'X'},
- {"min-xfer-size", require_arg, 'x'},
- {"min-xfer-siz", require_arg, 'x'},
- {"min-xfer-si", require_arg, 'x'},
- {"min-xfer-s", require_arg, 'x'},
- {"min-xfer", require_arg, 'x'},
- {"min-xfe", require_arg, 'x'},
- {"min-xf", require_arg, 'x'},
- {"min-x", require_arg, 'x'},
- {"num-bytes", require_arg, 'e'},
- {"num-byte", require_arg, 'e'},
- {"num-byt", require_arg, 'e'},
- {"num-by", require_arg, 'e'},
- {"num-b", require_arg, 'e'},
- {"num-dsets", require_arg, 'd'},
- {"num-dset", require_arg, 'd'},
- {"num-dse", require_arg, 'd'},
- {"num-ds", require_arg, 'd'},
- {"num-d", require_arg, 'd'},
- {"num-files", require_arg, 'F'},
- {"num-file", require_arg, 'F'},
- {"num-fil", require_arg, 'F'},
- {"num-fi", require_arg, 'F'},
- {"num-f", require_arg, 'F'},
- {"num-iterations", require_arg, 'i'},
- {"num-iteration", require_arg, 'i'},
- {"num-iteratio", require_arg, 'i'},
- {"num-iterati", require_arg, 'i'},
- {"num-iterat", require_arg, 'i'},
- {"num-itera", require_arg, 'i'},
- {"num-iter", require_arg, 'i'},
- {"num-ite", require_arg, 'i'},
- {"num-it", require_arg, 'i'},
- {"num-i", require_arg, 'i'},
- {"output", require_arg, 'o'},
- {"outpu", require_arg, 'o'},
- {"outp", require_arg, 'o'},
- {"out", require_arg, 'o'},
- {"ou", require_arg, 'o'},
- {"threshold", require_arg, 'T'},
- {"threshol", require_arg, 'T'},
- {"thresho", require_arg, 'T'},
- {"thresh", require_arg, 'T'},
- {"thres", require_arg, 'T'},
- {"thre", require_arg, 'T'},
- {"thr", require_arg, 'T'},
- {"th", require_arg, 'T'},
- {"write-only", require_arg, 'w'},
- {"write-onl", require_arg, 'w'},
- {"write-on", require_arg, 'w'},
- {"write-o", require_arg, 'w'},
- {"write", require_arg, 'w'},
- {"writ", require_arg, 'w'},
- {"wri", require_arg, 'w'},
- {"wr", require_arg, 'w'},
- {NULL, 0, '\0'}};
+ {"block-size", require_arg, 'B'},
+ {"block-siz", require_arg, 'B'},
+ {"block-si", require_arg, 'B'},
+ {"block-s", require_arg, 'B'},
+ {"block-", require_arg, 'B'},
+ {"block", require_arg, 'B'},
+ {"bloc", require_arg, 'B'},
+ {"blo", require_arg, 'B'},
+ {"bl", require_arg, 'B'},
+ {"chunk", no_arg, 'c'},
+ {"chun", no_arg, 'c'},
+ {"chu", no_arg, 'c'},
+ {"ch", no_arg, 'c'},
+ {"collective", no_arg, 'C'},
+ {"collectiv", no_arg, 'C'},
+ {"collecti", no_arg, 'C'},
+ {"collect", no_arg, 'C'},
+ {"collec", no_arg, 'C'},
+ {"colle", no_arg, 'C'},
+ {"coll", no_arg, 'C'},
+ {"col", no_arg, 'C'},
+ {"co", no_arg, 'C'},
+ {"debug", require_arg, 'D'},
+ {"debu", require_arg, 'D'},
+ {"deb", require_arg, 'D'},
+ {"de", require_arg, 'D'},
+ {"geometry", no_arg, 'g'},
+ {"geometr", no_arg, 'g'},
+ {"geomet", no_arg, 'g'},
+ {"geome", no_arg, 'g'},
+ {"geom", no_arg, 'g'},
+ {"geo", no_arg, 'g'},
+ {"ge", no_arg, 'g'},
+ {"help", no_arg, 'h'},
+ {"hel", no_arg, 'h'},
+ {"he", no_arg, 'h'},
+ {"interleaved", require_arg, 'I'},
+ {"interleave", require_arg, 'I'},
+ {"interleav", require_arg, 'I'},
+ {"interlea", require_arg, 'I'},
+ {"interle", require_arg, 'I'},
+ {"interl", require_arg, 'I'},
+ {"inter", require_arg, 'I'},
+ {"inte", require_arg, 'I'},
+ {"int", require_arg, 'I'},
+ {"in", require_arg, 'I'},
+ {"max-num-processes", require_arg, 'P'},
+ {"max-num-processe", require_arg, 'P'},
+ {"max-num-process", require_arg, 'P'},
+ {"max-num-proces", require_arg, 'P'},
+ {"max-num-proce", require_arg, 'P'},
+ {"max-num-proc", require_arg, 'P'},
+ {"max-num-pro", require_arg, 'P'},
+ {"max-num-pr", require_arg, 'P'},
+ {"max-num-p", require_arg, 'P'},
+ {"min-num-processes", require_arg, 'p'},
+ {"min-num-processe", require_arg, 'p'},
+ {"min-num-process", require_arg, 'p'},
+ {"min-num-proces", require_arg, 'p'},
+ {"min-num-proce", require_arg, 'p'},
+ {"min-num-proc", require_arg, 'p'},
+ {"min-num-pro", require_arg, 'p'},
+ {"min-num-pr", require_arg, 'p'},
+ {"min-num-p", require_arg, 'p'},
+ {"max-xfer-size", require_arg, 'X'},
+ {"max-xfer-siz", require_arg, 'X'},
+ {"max-xfer-si", require_arg, 'X'},
+ {"max-xfer-s", require_arg, 'X'},
+ {"max-xfer", require_arg, 'X'},
+ {"max-xfe", require_arg, 'X'},
+ {"max-xf", require_arg, 'X'},
+ {"max-x", require_arg, 'X'},
+ {"min-xfer-size", require_arg, 'x'},
+ {"min-xfer-siz", require_arg, 'x'},
+ {"min-xfer-si", require_arg, 'x'},
+ {"min-xfer-s", require_arg, 'x'},
+ {"min-xfer", require_arg, 'x'},
+ {"min-xfe", require_arg, 'x'},
+ {"min-xf", require_arg, 'x'},
+ {"min-x", require_arg, 'x'},
+ {"num-bytes", require_arg, 'e'},
+ {"num-byte", require_arg, 'e'},
+ {"num-byt", require_arg, 'e'},
+ {"num-by", require_arg, 'e'},
+ {"num-b", require_arg, 'e'},
+ {"num-dsets", require_arg, 'd'},
+ {"num-dset", require_arg, 'd'},
+ {"num-dse", require_arg, 'd'},
+ {"num-ds", require_arg, 'd'},
+ {"num-d", require_arg, 'd'},
+ {"num-files", require_arg, 'F'},
+ {"num-file", require_arg, 'F'},
+ {"num-fil", require_arg, 'F'},
+ {"num-fi", require_arg, 'F'},
+ {"num-f", require_arg, 'F'},
+ {"num-iterations", require_arg, 'i'},
+ {"num-iteration", require_arg, 'i'},
+ {"num-iteratio", require_arg, 'i'},
+ {"num-iterati", require_arg, 'i'},
+ {"num-iterat", require_arg, 'i'},
+ {"num-itera", require_arg, 'i'},
+ {"num-iter", require_arg, 'i'},
+ {"num-ite", require_arg, 'i'},
+ {"num-it", require_arg, 'i'},
+ {"num-i", require_arg, 'i'},
+ {"output", require_arg, 'o'},
+ {"outpu", require_arg, 'o'},
+ {"outp", require_arg, 'o'},
+ {"out", require_arg, 'o'},
+ {"ou", require_arg, 'o'},
+ {"threshold", require_arg, 'T'},
+ {"threshol", require_arg, 'T'},
+ {"thresho", require_arg, 'T'},
+ {"thresh", require_arg, 'T'},
+ {"thres", require_arg, 'T'},
+ {"thre", require_arg, 'T'},
+ {"thr", require_arg, 'T'},
+ {"th", require_arg, 'T'},
+ {"write-only", require_arg, 'w'},
+ {"write-onl", require_arg, 'w'},
+ {"write-on", require_arg, 'w'},
+ {"write-o", require_arg, 'w'},
+ {"write", require_arg, 'w'},
+ {"writ", require_arg, 'w'},
+ {"wri", require_arg, 'w'},
+ {"wr", require_arg, 'w'},
+ {NULL, 0, '\0'}};
struct options {
long io_types; /* bitmask of which I/O types to test */
@@ -1286,13 +1286,13 @@ parse_command_line(int argc, char *argv[])
cl_opts->h5_write_only = FALSE; /* Do both read and write by default */
cl_opts->verify = FALSE; /* No Verify data correctness by default */
- while ((opt = get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) {
+ while ((opt = H5_get_option(argc, (const char **)argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'a':
- cl_opts->h5_alignment = parse_size_directive(opt_arg);
+ cl_opts->h5_alignment = parse_size_directive(H5_optarg);
break;
case 'A': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
while (end && *end != '\0') {
char buf[10];
@@ -1332,7 +1332,7 @@ parse_command_line(int argc, char *argv[])
break;
#endif /* 0 */
case 'B':
- cl_opts->blk_size = (size_t)parse_size_directive(opt_arg);
+ cl_opts->blk_size = (size_t)parse_size_directive(H5_optarg);
break;
case 'c':
/* Turn on chunked HDF5 dataset creation */
@@ -1342,10 +1342,10 @@ parse_command_line(int argc, char *argv[])
cl_opts->collective = 1;
break;
case 'd':
- cl_opts->num_dsets = atoi(opt_arg);
+ cl_opts->num_dsets = atoi(H5_optarg);
break;
case 'D': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
while (end && *end != '\0') {
char buf[10];
@@ -1402,40 +1402,40 @@ parse_command_line(int argc, char *argv[])
break;
case 'e':
- cl_opts->num_bpp = parse_size_directive(opt_arg);
+ cl_opts->num_bpp = parse_size_directive(H5_optarg);
break;
case 'F':
- cl_opts->num_files = HDatoi(opt_arg);
+ cl_opts->num_files = HDatoi(H5_optarg);
break;
case 'g':
cl_opts->dim2d = 1;
break;
case 'i':
- cl_opts->num_iters = HDatoi(opt_arg);
+ cl_opts->num_iters = HDatoi(H5_optarg);
break;
case 'I':
cl_opts->interleaved = 1;
break;
case 'o':
- cl_opts->output_file = opt_arg;
+ cl_opts->output_file = H5_optarg;
break;
case 'p':
- cl_opts->min_num_procs = HDatoi(opt_arg);
+ cl_opts->min_num_procs = HDatoi(H5_optarg);
break;
case 'P':
- cl_opts->max_num_procs = HDatoi(opt_arg);
+ cl_opts->max_num_procs = HDatoi(H5_optarg);
break;
case 'T':
- cl_opts->h5_threshold = parse_size_directive(opt_arg);
+ cl_opts->h5_threshold = parse_size_directive(H5_optarg);
break;
case 'w':
cl_opts->h5_write_only = TRUE;
break;
case 'x':
- cl_opts->min_xfer_size = (size_t)parse_size_directive(opt_arg);
+ cl_opts->min_xfer_size = (size_t)parse_size_directive(H5_optarg);
break;
case 'X':
- cl_opts->max_xfer_size = (size_t)parse_size_directive(opt_arg);
+ cl_opts->max_xfer_size = (size_t)parse_size_directive(H5_optarg);
break;
case 'h':
case '?':
diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c
index 0a9bfc0..db8633e 100644
--- a/tools/test/perform/pio_standalone.c
+++ b/tools/test/perform/pio_standalone.c
@@ -27,30 +27,30 @@ MPI_Info h5_io_info_g = MPI_INFO_NULL; /* MPI INFO object for IO */
int nCols = 80;
/* ``get_option'' variables */
-int opt_err = 1; /*get_option prints errors if this is on */
-int opt_ind = 1; /*token pointer */
-const char *opt_arg; /*flag argument (or value) */
+int H5_opterr = 1; /*get_option prints errors if this is on */
+int H5_optind = 1; /*token pointer */
+const char *H5_optarg; /*flag argument (or value) */
int
-get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts)
+get_option(int argc, const char **argv, const char *opts, const struct h5_long_options *l_opts)
{
static int sp = 1; /* character index in current token */
int opt_opt = '?'; /* option character passed back to user */
if (sp == 1) {
/* check for more flag-like tokens */
- if (opt_ind >= argc || argv[opt_ind][0] != '-' || argv[opt_ind][1] == '\0') {
+ if (H5_optind >= argc || argv[H5_optind][0] != '-' || argv[H5_optind][1] == '\0') {
return EOF;
}
- else if (HDstrcmp(argv[opt_ind], "--") == 0) {
- opt_ind++;
+ else if (HDstrcmp(argv[H5_optind], "--") == 0) {
+ H5_optind++;
return EOF;
}
}
- if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') {
+ if (sp == 1 && argv[H5_optind][0] == '-' && argv[H5_optind][1] == '-') {
/* long command line option */
- const char *arg = &argv[opt_ind][2];
+ const char *arg = &argv[H5_optind][2];
int i;
for (i = 0; l_opts && l_opts[i].name; i++) {
@@ -62,13 +62,13 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].has_arg != no_arg) {
if (arg[len] == '=') {
- opt_arg = &arg[len + 1];
+ H5_optarg = &arg[len + 1];
}
- else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') {
- opt_arg = argv[++opt_ind];
+ else if (H5_optind < (argc - 1) && argv[H5_optind + 1][0] != '-') {
+ H5_optarg = argv[++H5_optind];
}
else if (l_opts[i].has_arg == require_arg) {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
opt_opt = '?';
@@ -76,13 +76,13 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
}
else {
if (arg[len] == '=') {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
opt_opt = '?';
}
- opt_arg = NULL;
+ H5_optarg = NULL;
}
break;
@@ -91,29 +91,29 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].name == NULL) {
/* exhausted all of the l_opts we have and still didn't match */
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
opt_opt = '?';
}
- opt_ind++;
+ H5_optind++;
sp = 1;
}
else {
register char *cp; /* pointer into current token */
/* short command line option */
- opt_opt = argv[opt_ind][sp];
+ opt_opt = argv[H5_optind][sp];
if (opt_opt == ':' || (cp = strchr(opts, opt_opt)) == 0) {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], opt_opt);
/* if no chars left in this token, move to next token */
- if (argv[opt_ind][++sp] == '\0') {
- opt_ind++;
+ if (argv[H5_optind][++sp] == '\0') {
+ H5_optind++;
sp = 1;
}
@@ -122,32 +122,32 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (*++cp == ':') {
/* if a value is expected, get it */
- if (argv[opt_ind][sp + 1] != '\0') {
+ if (argv[H5_optind][sp + 1] != '\0') {
/* flag value is rest of current token */
- opt_arg = &argv[opt_ind++][sp + 1];
+ H5_optarg = &argv[H5_optind++][sp + 1];
}
- else if (++opt_ind >= argc) {
- if (opt_err)
+ else if (++H5_optind >= argc) {
+ if (H5_opterr)
HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], opt_opt);
opt_opt = '?';
}
else {
/* flag value is next token */
- opt_arg = argv[opt_ind++];
+ H5_optarg = argv[H5_optind++];
}
sp = 1;
}
else {
/* set up to look at next char in token, next time */
- if (argv[opt_ind][++sp] == '\0') {
+ if (argv[H5_optind][++sp] == '\0') {
/* no more in current token, so setup next token */
- opt_ind++;
+ H5_optind++;
sp = 1;
}
- opt_arg = NULL;
+ H5_optarg = NULL;
}
}
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index 82fabdc..4b5c7b2 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -90,28 +90,20 @@
#define HDctermid(S) ctermid(S)
#define HDctime(T) ctime(T)
#define HDcuserid(S) cuserid(S)
-#ifdef H5_HAVE_DIFFTIME
-#define HDdifftime(X, Y) difftime(X, Y)
-#else
-#define HDdifftime(X, Y) ((double)(X) - (double)(Y))
-#endif
-#define HDdiv(X, Y) div(X, Y)
-#define HDdup(F) dup(F)
-#define HDdup2(F, I) dup2(F, I)
-/* execl() variable arguments */
-/* execle() variable arguments */
-/* execlp() variable arguments */
-#define HDexecv(S, AV) execv(S, AV)
-#define HDexecve(S, AV, E) execve(S, AV, E)
-#define HDexecvp(S, AV) execvp(S, AV)
-#define HDexit(N) exit(N)
-#define HD_exit(N) _exit(N)
-#define HDexp(X) exp(X)
-#define HDfabs(X) fabs(X)
-/* use ABS() because fabsf() fabsl() are not common yet. */
-#define HDfabsf(X) ABS(X)
-#define HDfabsl(X) ABS(X)
-#define HDfclose(F) fclose(F)
+#define HDdifftime(X, Y) difftime(X, Y)
+#define HDdiv(X, Y) div(X, Y)
+#define HDdup(F) dup(F)
+#define HDdup2(F, I) dup2(F, I)
+#define HDexecv(S, AV) execv(S, AV)
+#define HDexecve(S, AV, E) execve(S, AV, E)
+#define HDexecvp(S, AV) execvp(S, AV)
+#define HDexit(N) exit(N)
+#define HD_exit(N) _exit(N)
+#define HDexp(X) exp(X)
+#define HDfabs(X) fabs(X)
+#define HDfabsf(X) fabsf(X)
+#define HDfabsl(X) fabsl(X)
+#define HDfclose(F) fclose(F)
/* fcntl() variable arguments */
#define HDfdopen(N, S) fdopen(N, S)
#define HDfeof(F) feof(F)
@@ -137,17 +129,8 @@
#define HDfree(M) free(M)
#define HDfreopen(S, M, F) freopen(S, M, F)
#define HDfrexp(X, N) frexp(X, N)
-/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
-#ifdef H5_HAVE_FREXPF
-#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
-#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
-#ifdef H5_HAVE_FREXPL
-#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
-#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
+#define HDfrexpf(X, N) frexpf(X, N)
+#define HDfrexpl(X, N) frexpl(X, N)
/* fscanf() variable arguments */
#ifdef H5_HAVE_FSEEKO
#define HDfseek(F, O, W) fseeko(F, O, W)
@@ -471,24 +454,25 @@ void h5_dump_info_object(MPI_Info info);
/** From h5tools_utils.h **/
-extern int opt_err; /* getoption prints errors if this is on */
-extern int opt_ind; /* token pointer */
-extern const char *opt_arg; /* flag argument (or value) */
+extern int H5_opterr; /* getoption prints errors if this is on */
+extern int H5_optind; /* token pointer */
+extern const char *H5_optarg; /* flag argument (or value) */
-enum {
+enum h5_arg_level {
no_arg = 0, /* doesn't take an argument */
require_arg, /* requires an argument */
optional_arg /* argument is optional */
};
-typedef struct long_options {
- const char *name; /* name of the long option */
- int has_arg; /* whether we should look for an arg */
- char shortval; /* the shortname equivalent of long arg
- * this gets returned from get_option */
-} long_options;
+struct h5_long_options {
+ const char * name; /* Name of the long option */
+ enum h5_arg_level has_arg; /* Whether we should look for an arg */
+ char shortval; /* The shortname equivalent of long arg
+ * this gets returned from get_option
+ */
+};
-extern int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt);
+extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt);
extern int nCols; /*max number of columns for outputting */
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index fe4e7e7..51a7825 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -97,13 +97,13 @@ static const char *progname = "h5perf_serial";
* It seems that only the options that accept additional information
* such as dataset size (-e) require the colon next to it.
*/
-static const char * s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:";
-static struct long_options l_opts[] = {{"align", require_arg, 'a'},
- {"alig", require_arg, 'a'},
- {"ali", require_arg, 'a'},
- {"al", require_arg, 'a'},
- {"api", require_arg, 'A'},
- {"ap", require_arg, 'A'},
+static const char * s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:";
+static struct h5_long_options l_opts[] = {{"align", require_arg, 'a'},
+ {"alig", require_arg, 'a'},
+ {"ali", require_arg, 'a'},
+ {"al", require_arg, 'a'},
+ {"api", require_arg, 'A'},
+ {"ap", require_arg, 'A'},
#if 0
/* a sighting of the elusive binary option */
{ "binary", no_arg, 'b' },
@@ -112,156 +112,156 @@ static struct long_options l_opts[] = {{"align", require_arg, 'a'},
{ "bin", no_arg, 'b' },
{ "bi", no_arg, 'b' },
#endif /* 0 */
- {"block-size", require_arg, 'B'},
- {"block-siz", require_arg, 'B'},
- {"block-si", require_arg, 'B'},
- {"block-s", require_arg, 'B'},
- {"block-", require_arg, 'B'},
- {"block", require_arg, 'B'},
- {"bloc", require_arg, 'B'},
- {"blo", require_arg, 'B'},
- {"bl", require_arg, 'B'},
- {"chunk", no_arg, 'c'},
- {"chun", no_arg, 'c'},
- {"chu", no_arg, 'c'},
- {"ch", no_arg, 'c'},
- {"collective", no_arg, 'C'},
- {"collectiv", no_arg, 'C'},
- {"collecti", no_arg, 'C'},
- {"collect", no_arg, 'C'},
- {"collec", no_arg, 'C'},
- {"colle", no_arg, 'C'},
- {"coll", no_arg, 'C'},
- {"col", no_arg, 'C'},
- {"co", no_arg, 'C'},
- {"debug", require_arg, 'D'},
- {"debu", require_arg, 'D'},
- {"deb", require_arg, 'D'},
- {"de", require_arg, 'D'},
- {"file-driver", require_arg, 'v'},
- {"file-drive", require_arg, 'v'},
- {"file-driv", require_arg, 'v'},
- {"file-dri", require_arg, 'v'},
- {"file-dr", require_arg, 'v'},
- {"file-d", require_arg, 'v'},
- {"file-", require_arg, 'v'},
- {"file", require_arg, 'v'},
- {"fil", require_arg, 'v'},
- {"fi", require_arg, 'v'},
- {"geometry", no_arg, 'g'},
- {"geometr", no_arg, 'g'},
- {"geomet", no_arg, 'g'},
- {"geome", no_arg, 'g'},
- {"geom", no_arg, 'g'},
- {"geo", no_arg, 'g'},
- {"ge", no_arg, 'g'},
- {"help", no_arg, 'h'},
- {"hel", no_arg, 'h'},
- {"he", no_arg, 'h'},
- {"interleaved", require_arg, 'I'},
- {"interleave", require_arg, 'I'},
- {"interleav", require_arg, 'I'},
- {"interlea", require_arg, 'I'},
- {"interle", require_arg, 'I'},
- {"interl", require_arg, 'I'},
- {"inter", require_arg, 'I'},
- {"inte", require_arg, 'I'},
- {"int", require_arg, 'I'},
- {"in", require_arg, 'I'},
- {"max-num-processes", require_arg, 'P'},
- {"max-num-processe", require_arg, 'P'},
- {"max-num-process", require_arg, 'P'},
- {"max-num-proces", require_arg, 'P'},
- {"max-num-proce", require_arg, 'P'},
- {"max-num-proc", require_arg, 'P'},
- {"max-num-pro", require_arg, 'P'},
- {"max-num-pr", require_arg, 'P'},
- {"max-num-p", require_arg, 'P'},
- {"min-num-processes", require_arg, 'p'},
- {"min-num-processe", require_arg, 'p'},
- {"min-num-process", require_arg, 'p'},
- {"min-num-proces", require_arg, 'p'},
- {"min-num-proce", require_arg, 'p'},
- {"min-num-proc", require_arg, 'p'},
- {"min-num-pro", require_arg, 'p'},
- {"min-num-pr", require_arg, 'p'},
- {"min-num-p", require_arg, 'p'},
- {"max-xfer-size", require_arg, 'X'},
- {"max-xfer-siz", require_arg, 'X'},
- {"max-xfer-si", require_arg, 'X'},
- {"max-xfer-s", require_arg, 'X'},
- {"max-xfer", require_arg, 'X'},
- {"max-xfe", require_arg, 'X'},
- {"max-xf", require_arg, 'X'},
- {"max-x", require_arg, 'X'},
- {"min-xfer-size", require_arg, 'x'},
- {"min-xfer-siz", require_arg, 'x'},
- {"min-xfer-si", require_arg, 'x'},
- {"min-xfer-s", require_arg, 'x'},
- {"min-xfer", require_arg, 'x'},
- {"min-xfe", require_arg, 'x'},
- {"min-xf", require_arg, 'x'},
- {"min-x", require_arg, 'x'},
- {"num-bytes", require_arg, 'e'},
- {"num-byte", require_arg, 'e'},
- {"num-byt", require_arg, 'e'},
- {"num-by", require_arg, 'e'},
- {"num-b", require_arg, 'e'},
- {"num-dsets", require_arg, 'd'},
- {"num-dset", require_arg, 'd'},
- {"num-dse", require_arg, 'd'},
- {"num-ds", require_arg, 'd'},
- {"num-d", require_arg, 'd'},
- {"num-files", require_arg, 'F'},
- {"num-file", require_arg, 'F'},
- {"num-fil", require_arg, 'F'},
- {"num-fi", require_arg, 'F'},
- {"num-f", require_arg, 'F'},
- {"num-iterations", require_arg, 'i'},
- {"num-iteration", require_arg, 'i'},
- {"num-iteratio", require_arg, 'i'},
- {"num-iterati", require_arg, 'i'},
- {"num-iterat", require_arg, 'i'},
- {"num-itera", require_arg, 'i'},
- {"num-iter", require_arg, 'i'},
- {"num-ite", require_arg, 'i'},
- {"num-it", require_arg, 'i'},
- {"num-i", require_arg, 'i'},
- {"order", require_arg, 'r'},
- {"orde", require_arg, 'r'},
- {"ord", require_arg, 'r'},
- {"or", require_arg, 'r'},
- {"output", require_arg, 'o'},
- {"outpu", require_arg, 'o'},
- {"outp", require_arg, 'o'},
- {"out", require_arg, 'o'},
- {"ou", require_arg, 'o'},
- {"extendable", no_arg, 't'},
- {"extendabl", no_arg, 't'},
- {"extendab", no_arg, 't'},
- {"extenda", no_arg, 't'},
- {"extend", no_arg, 't'},
- {"exten", no_arg, 't'},
- {"exte", no_arg, 't'},
- {"ext", no_arg, 't'},
- {"ex", no_arg, 't'},
- {"threshold", require_arg, 'T'},
- {"threshol", require_arg, 'T'},
- {"thresho", require_arg, 'T'},
- {"thresh", require_arg, 'T'},
- {"thres", require_arg, 'T'},
- {"thre", require_arg, 'T'},
- {"thr", require_arg, 'T'},
- {"th", require_arg, 'T'},
- {"write-only", require_arg, 'w'},
- {"write-onl", require_arg, 'w'},
- {"write-on", require_arg, 'w'},
- {"write-o", require_arg, 'w'},
- {"write", require_arg, 'w'},
- {"writ", require_arg, 'w'},
- {"wri", require_arg, 'w'},
- {"wr", require_arg, 'w'},
- {NULL, 0, '\0'}};
+ {"block-size", require_arg, 'B'},
+ {"block-siz", require_arg, 'B'},
+ {"block-si", require_arg, 'B'},
+ {"block-s", require_arg, 'B'},
+ {"block-", require_arg, 'B'},
+ {"block", require_arg, 'B'},
+ {"bloc", require_arg, 'B'},
+ {"blo", require_arg, 'B'},
+ {"bl", require_arg, 'B'},
+ {"chunk", no_arg, 'c'},
+ {"chun", no_arg, 'c'},
+ {"chu", no_arg, 'c'},
+ {"ch", no_arg, 'c'},
+ {"collective", no_arg, 'C'},
+ {"collectiv", no_arg, 'C'},
+ {"collecti", no_arg, 'C'},
+ {"collect", no_arg, 'C'},
+ {"collec", no_arg, 'C'},
+ {"colle", no_arg, 'C'},
+ {"coll", no_arg, 'C'},
+ {"col", no_arg, 'C'},
+ {"co", no_arg, 'C'},
+ {"debug", require_arg, 'D'},
+ {"debu", require_arg, 'D'},
+ {"deb", require_arg, 'D'},
+ {"de", require_arg, 'D'},
+ {"file-driver", require_arg, 'v'},
+ {"file-drive", require_arg, 'v'},
+ {"file-driv", require_arg, 'v'},
+ {"file-dri", require_arg, 'v'},
+ {"file-dr", require_arg, 'v'},
+ {"file-d", require_arg, 'v'},
+ {"file-", require_arg, 'v'},
+ {"file", require_arg, 'v'},
+ {"fil", require_arg, 'v'},
+ {"fi", require_arg, 'v'},
+ {"geometry", no_arg, 'g'},
+ {"geometr", no_arg, 'g'},
+ {"geomet", no_arg, 'g'},
+ {"geome", no_arg, 'g'},
+ {"geom", no_arg, 'g'},
+ {"geo", no_arg, 'g'},
+ {"ge", no_arg, 'g'},
+ {"help", no_arg, 'h'},
+ {"hel", no_arg, 'h'},
+ {"he", no_arg, 'h'},
+ {"interleaved", require_arg, 'I'},
+ {"interleave", require_arg, 'I'},
+ {"interleav", require_arg, 'I'},
+ {"interlea", require_arg, 'I'},
+ {"interle", require_arg, 'I'},
+ {"interl", require_arg, 'I'},
+ {"inter", require_arg, 'I'},
+ {"inte", require_arg, 'I'},
+ {"int", require_arg, 'I'},
+ {"in", require_arg, 'I'},
+ {"max-num-processes", require_arg, 'P'},
+ {"max-num-processe", require_arg, 'P'},
+ {"max-num-process", require_arg, 'P'},
+ {"max-num-proces", require_arg, 'P'},
+ {"max-num-proce", require_arg, 'P'},
+ {"max-num-proc", require_arg, 'P'},
+ {"max-num-pro", require_arg, 'P'},
+ {"max-num-pr", require_arg, 'P'},
+ {"max-num-p", require_arg, 'P'},
+ {"min-num-processes", require_arg, 'p'},
+ {"min-num-processe", require_arg, 'p'},
+ {"min-num-process", require_arg, 'p'},
+ {"min-num-proces", require_arg, 'p'},
+ {"min-num-proce", require_arg, 'p'},
+ {"min-num-proc", require_arg, 'p'},
+ {"min-num-pro", require_arg, 'p'},
+ {"min-num-pr", require_arg, 'p'},
+ {"min-num-p", require_arg, 'p'},
+ {"max-xfer-size", require_arg, 'X'},
+ {"max-xfer-siz", require_arg, 'X'},
+ {"max-xfer-si", require_arg, 'X'},
+ {"max-xfer-s", require_arg, 'X'},
+ {"max-xfer", require_arg, 'X'},
+ {"max-xfe", require_arg, 'X'},
+ {"max-xf", require_arg, 'X'},
+ {"max-x", require_arg, 'X'},
+ {"min-xfer-size", require_arg, 'x'},
+ {"min-xfer-siz", require_arg, 'x'},
+ {"min-xfer-si", require_arg, 'x'},
+ {"min-xfer-s", require_arg, 'x'},
+ {"min-xfer", require_arg, 'x'},
+ {"min-xfe", require_arg, 'x'},
+ {"min-xf", require_arg, 'x'},
+ {"min-x", require_arg, 'x'},
+ {"num-bytes", require_arg, 'e'},
+ {"num-byte", require_arg, 'e'},
+ {"num-byt", require_arg, 'e'},
+ {"num-by", require_arg, 'e'},
+ {"num-b", require_arg, 'e'},
+ {"num-dsets", require_arg, 'd'},
+ {"num-dset", require_arg, 'd'},
+ {"num-dse", require_arg, 'd'},
+ {"num-ds", require_arg, 'd'},
+ {"num-d", require_arg, 'd'},
+ {"num-files", require_arg, 'F'},
+ {"num-file", require_arg, 'F'},
+ {"num-fil", require_arg, 'F'},
+ {"num-fi", require_arg, 'F'},
+ {"num-f", require_arg, 'F'},
+ {"num-iterations", require_arg, 'i'},
+ {"num-iteration", require_arg, 'i'},
+ {"num-iteratio", require_arg, 'i'},
+ {"num-iterati", require_arg, 'i'},
+ {"num-iterat", require_arg, 'i'},
+ {"num-itera", require_arg, 'i'},
+ {"num-iter", require_arg, 'i'},
+ {"num-ite", require_arg, 'i'},
+ {"num-it", require_arg, 'i'},
+ {"num-i", require_arg, 'i'},
+ {"order", require_arg, 'r'},
+ {"orde", require_arg, 'r'},
+ {"ord", require_arg, 'r'},
+ {"or", require_arg, 'r'},
+ {"output", require_arg, 'o'},
+ {"outpu", require_arg, 'o'},
+ {"outp", require_arg, 'o'},
+ {"out", require_arg, 'o'},
+ {"ou", require_arg, 'o'},
+ {"extendable", no_arg, 't'},
+ {"extendabl", no_arg, 't'},
+ {"extendab", no_arg, 't'},
+ {"extenda", no_arg, 't'},
+ {"extend", no_arg, 't'},
+ {"exten", no_arg, 't'},
+ {"exte", no_arg, 't'},
+ {"ext", no_arg, 't'},
+ {"ex", no_arg, 't'},
+ {"threshold", require_arg, 'T'},
+ {"threshol", require_arg, 'T'},
+ {"thresho", require_arg, 'T'},
+ {"thresh", require_arg, 'T'},
+ {"thres", require_arg, 'T'},
+ {"thre", require_arg, 'T'},
+ {"thr", require_arg, 'T'},
+ {"th", require_arg, 'T'},
+ {"write-only", require_arg, 'w'},
+ {"write-onl", require_arg, 'w'},
+ {"write-on", require_arg, 'w'},
+ {"write-o", require_arg, 'w'},
+ {"write", require_arg, 'w'},
+ {"writ", require_arg, 'w'},
+ {"wri", require_arg, 'w'},
+ {"wr", require_arg, 'w'},
+ {NULL, 0, '\0'}};
struct options {
long io_types; /* bitmask of which I/O types to test */
@@ -993,19 +993,19 @@ parse_command_line(int argc, const char *argv[])
cl_opts->h5_extendable = FALSE; /* Use extendable dataset */
cl_opts->verify = FALSE; /* No Verify data correctness by default */
- while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'a':
- cl_opts->h5_alignment = parse_size_directive(opt_arg);
+ cl_opts->h5_alignment = parse_size_directive(H5_optarg);
break;
case 'G':
- cl_opts->page_size = parse_size_directive(opt_arg);
+ cl_opts->page_size = parse_size_directive(H5_optarg);
break;
case 'b':
- cl_opts->page_buffer_size = parse_size_directive(opt_arg);
+ cl_opts->page_buffer_size = parse_size_directive(H5_optarg);
break;
case 'A': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
while (end && *end != '\0') {
char buf[10];
@@ -1043,7 +1043,7 @@ parse_command_line(int argc, const char *argv[])
/* Turn on chunked HDF5 dataset creation */
cl_opts->h5_use_chunks = 1;
{
- const char *end = opt_arg;
+ const char *end = H5_optarg;
int j = 0;
while (end && *end != '\0') {
@@ -1070,7 +1070,7 @@ parse_command_line(int argc, const char *argv[])
break;
case 'D': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
while (end && *end != '\0') {
char buf[10];
@@ -1126,7 +1126,7 @@ parse_command_line(int argc, const char *argv[])
break;
case 'e': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
int j = 0;
while (end && *end != '\0') {
@@ -1153,38 +1153,38 @@ parse_command_line(int argc, const char *argv[])
break;
case 'i':
- cl_opts->num_iters = HDatoi(opt_arg);
+ cl_opts->num_iters = HDatoi(H5_optarg);
break;
case 'o':
- cl_opts->output_file = opt_arg;
+ cl_opts->output_file = H5_optarg;
break;
case 'T':
- cl_opts->h5_threshold = parse_size_directive(opt_arg);
+ cl_opts->h5_threshold = parse_size_directive(H5_optarg);
break;
case 'v':
- if (!HDstrcasecmp(opt_arg, "sec2")) {
+ if (!HDstrcasecmp(H5_optarg, "sec2")) {
cl_opts->vfd = sec2;
}
- else if (!HDstrcasecmp(opt_arg, "stdio")) {
+ else if (!HDstrcasecmp(H5_optarg, "stdio")) {
cl_opts->vfd = stdio;
}
- else if (!HDstrcasecmp(opt_arg, "core")) {
+ else if (!HDstrcasecmp(H5_optarg, "core")) {
cl_opts->vfd = core;
}
- else if (!HDstrcasecmp(opt_arg, "split")) {
+ else if (!HDstrcasecmp(H5_optarg, "split")) {
cl_opts->vfd = split;
}
- else if (!HDstrcasecmp(opt_arg, "multi")) {
+ else if (!HDstrcasecmp(H5_optarg, "multi")) {
cl_opts->vfd = multi;
}
- else if (!HDstrcasecmp(opt_arg, "family")) {
+ else if (!HDstrcasecmp(H5_optarg, "family")) {
cl_opts->vfd = family;
}
- else if (!HDstrcasecmp(opt_arg, "direct")) {
+ else if (!HDstrcasecmp(H5_optarg, "direct")) {
cl_opts->vfd = direct;
}
else {
- HDfprintf(stderr, "sio_perf: invalid --api option %s\n", opt_arg);
+ HDfprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
HDexit(EXIT_FAILURE);
}
break;
@@ -1195,7 +1195,7 @@ parse_command_line(int argc, const char *argv[])
cl_opts->h5_extendable = TRUE;
break;
case 'x': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
int j = 0;
while (end && *end != '\0') {
@@ -1222,7 +1222,7 @@ parse_command_line(int argc, const char *argv[])
break;
case 'r': {
- const char *end = opt_arg;
+ const char *end = H5_optarg;
int j = 0;
while (end && *end != '\0') {
diff --git a/tools/test/perform/sio_standalone.c b/tools/test/perform/sio_standalone.c
index abc0777..2e793fb 100644
--- a/tools/test/perform/sio_standalone.c
+++ b/tools/test/perform/sio_standalone.c
@@ -23,30 +23,30 @@
int nCols = 80;
/* ``get_option'' variables */
-int opt_err = 1; /*get_option prints errors if this is on */
-int opt_ind = 1; /*token pointer */
-const char *opt_arg; /*flag argument (or value) */
+int H5_opterr = 1; /*get_option prints errors if this is on */
+int H5_optind = 1; /*token pointer */
+const char *H5_optarg; /*flag argument (or value) */
int
-get_option(int argc, const char **argv, const char *opts, const struct long_options *l_opts)
+get_option(int argc, const char **argv, const char *opts, const struct h5_long_options *l_opts)
{
static int sp = 1; /* character index in current token */
int opt_opt = '?'; /* option character passed back to user */
if (sp == 1) {
/* check for more flag-like tokens */
- if (opt_ind >= argc || argv[opt_ind][0] != '-' || argv[opt_ind][1] == '\0') {
+ if (H5_optind >= argc || argv[H5_optind][0] != '-' || argv[H5_optind][1] == '\0') {
return EOF;
}
- else if (HDstrcmp(argv[opt_ind], "--") == 0) {
- opt_ind++;
+ else if (HDstrcmp(argv[H5_optind], "--") == 0) {
+ H5_optind++;
return EOF;
}
}
- if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') {
+ if (sp == 1 && argv[H5_optind][0] == '-' && argv[H5_optind][1] == '-') {
/* long command line option */
- const char *arg = &argv[opt_ind][2];
+ const char *arg = &argv[H5_optind][2];
int i;
for (i = 0; l_opts && l_opts[i].name; i++) {
@@ -58,13 +58,13 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].has_arg != no_arg) {
if (arg[len] == '=') {
- opt_arg = &arg[len + 1];
+ H5_optarg = &arg[len + 1];
}
- else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') {
- opt_arg = argv[++opt_ind];
+ else if (H5_optind < (argc - 1) && argv[H5_optind + 1][0] != '-') {
+ H5_optarg = argv[++H5_optind];
}
else if (l_opts[i].has_arg == require_arg) {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
opt_opt = '?';
@@ -72,13 +72,13 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
}
else {
if (arg[len] == '=') {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
opt_opt = '?';
}
- opt_arg = NULL;
+ H5_optarg = NULL;
}
break;
@@ -87,29 +87,29 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (l_opts[i].name == NULL) {
/* exhausted all of the l_opts we have and still didn't match */
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
opt_opt = '?';
}
- opt_ind++;
+ H5_optind++;
sp = 1;
}
else {
register char *cp; /* pointer into current token */
/* short command line option */
- opt_opt = argv[opt_ind][sp];
+ opt_opt = argv[H5_optind][sp];
if (opt_opt == ':' || (cp = strchr(opts, opt_opt)) == 0) {
- if (opt_err)
+ if (H5_opterr)
HDfprintf(stderr, "%s: unknown option \"%c\"\n", argv[0], opt_opt);
/* if no chars left in this token, move to next token */
- if (argv[opt_ind][++sp] == '\0') {
- opt_ind++;
+ if (argv[H5_optind][++sp] == '\0') {
+ H5_optind++;
sp = 1;
}
@@ -118,32 +118,32 @@ get_option(int argc, const char **argv, const char *opts, const struct long_opti
if (*++cp == ':') {
/* if a value is expected, get it */
- if (argv[opt_ind][sp + 1] != '\0') {
+ if (argv[H5_optind][sp + 1] != '\0') {
/* flag value is rest of current token */
- opt_arg = &argv[opt_ind++][sp + 1];
+ H5_optarg = &argv[H5_optind++][sp + 1];
}
- else if (++opt_ind >= argc) {
- if (opt_err)
+ else if (++H5_optind >= argc) {
+ if (H5_opterr)
HDfprintf(stderr, "%s: value expected for option \"%c\"\n", argv[0], opt_opt);
opt_opt = '?';
}
else {
/* flag value is next token */
- opt_arg = argv[opt_ind++];
+ H5_optarg = argv[H5_optind++];
}
sp = 1;
}
else {
/* set up to look at next char in token, next time */
- if (argv[opt_ind][++sp] == '\0') {
+ if (argv[H5_optind][++sp] == '\0') {
/* no more in current token, so setup next token */
- opt_ind++;
+ H5_optind++;
sp = 1;
}
- opt_arg = NULL;
+ H5_optarg = NULL;
}
}
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 54e82fa..098b98a 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -105,28 +105,20 @@
#define HDctermid(S) ctermid(S)
#define HDctime(T) ctime(T)
#define HDcuserid(S) cuserid(S)
-#ifdef H5_HAVE_DIFFTIME
-#define HDdifftime(X, Y) difftime(X, Y)
-#else
-#define HDdifftime(X, Y) ((double)(X) - (double)(Y))
-#endif
-#define HDdiv(X, Y) div(X, Y)
-#define HDdup(F) dup(F)
-#define HDdup2(F, I) dup2(F, I)
-/* execl() variable arguments */
-/* execle() variable arguments */
-/* execlp() variable arguments */
-#define HDexecv(S, AV) execv(S, AV)
-#define HDexecve(S, AV, E) execve(S, AV, E)
-#define HDexecvp(S, AV) execvp(S, AV)
-#define HDexit(N) exit(N)
-#define HD_exit(N) _exit(N)
-#define HDexp(X) exp(X)
-#define HDfabs(X) fabs(X)
-/* use ABS() because fabsf() fabsl() are not common yet. */
-#define HDfabsf(X) ABS(X)
-#define HDfabsl(X) ABS(X)
-#define HDfclose(F) fclose(F)
+#define HDdifftime(X, Y) difftime(X, Y)
+#define HDdiv(X, Y) div(X, Y)
+#define HDdup(F) dup(F)
+#define HDdup2(F, I) dup2(F, I)
+#define HDexecv(S, AV) execv(S, AV)
+#define HDexecve(S, AV, E) execve(S, AV, E)
+#define HDexecvp(S, AV) execvp(S, AV)
+#define HDexit(N) exit(N)
+#define HD_exit(N) _exit(N)
+#define HDexp(X) exp(X)
+#define HDfabs(X) fabs(X)
+#define HDfabsf(X) fabsf(X)
+#define HDfabsl(X) fabsl(X)
+#define HDfclose(F) fclose(F)
/* fcntl() variable arguments */
#define HDfdopen(N, S) fdopen(N, S)
#define HDfeof(F) feof(F)
@@ -152,17 +144,8 @@
#define HDfree(M) free(M)
#define HDfreopen(S, M, F) freopen(S, M, F)
#define HDfrexp(X, N) frexp(X, N)
-/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
-#ifdef H5_HAVE_FREXPF
-#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
-#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
-#ifdef H5_HAVE_FREXPL
-#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
-#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
+#define HDfrexpf(X, N) frexpf(X, N)
+#define HDfrexpl(X, N) frexpl(X, N)
/* fscanf() variable arguments */
#ifdef H5_HAVE_FSEEKO
#define HDfseek(F, O, W) fseeko(F, O, W)
@@ -486,24 +469,25 @@ void h5_dump_info_object(MPI_Info info);
/** From h5tools_utils.h **/
-extern int opt_err; /* getoption prints errors if this is on */
-extern int opt_ind; /* token pointer */
-extern const char *opt_arg; /* flag argument (or value) */
+extern int H5_opterr; /* getoption prints errors if this is on */
+extern int H5_optind; /* token pointer */
+extern const char *H5_optarg; /* flag argument (or value) */
-enum {
+enum h5_arg_level {
no_arg = 0, /* doesn't take an argument */
require_arg, /* requires an argument */
optional_arg /* argument is optional */
};
-typedef struct long_options {
- const char *name; /* name of the long option */
- int has_arg; /* whether we should look for an arg */
- char shortval; /* the shortname equivalent of long arg
- * this gets returned from get_option */
-} long_options;
+struct h5_long_options {
+ const char * name; /* Name of the long option */
+ enum h5_arg_level has_arg; /* Whether we should look for an arg */
+ char shortval; /* The shortname equivalent of long arg
+ * this gets returned from get_option
+ */
+};
-extern int get_option(int argc, const char **argv, const char *opt, const struct long_options *l_opt);
+extern int H5_get_option(int argc, const char **argv, const char *opt, const struct h5_long_options *l_opt);
extern int nCols; /*max number of columns for outputting */
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 517866b..6231587 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -64,66 +64,66 @@ static void error(const char *fmt, ...);
static void compress_buffer(Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
/* commandline options : long and short form */
-static const char * s_opts = "hB:b:c:p:rs:0123456789";
-static struct long_options l_opts[] = {{"help", no_arg, 'h'},
- {"compressability", require_arg, 'c'},
- {"compressabilit", require_arg, 'c'},
- {"compressabili", require_arg, 'c'},
- {"compressabil", require_arg, 'c'},
- {"compressabi", require_arg, 'c'},
- {"compressab", require_arg, 'c'},
- {"compressa", require_arg, 'c'},
- {"compress", require_arg, 'c'},
- {"compres", require_arg, 'c'},
- {"compre", require_arg, 'c'},
- {"compr", require_arg, 'c'},
- {"comp", require_arg, 'c'},
- {"com", require_arg, 'c'},
- {"co", require_arg, 'c'},
- {"file-size", require_arg, 's'},
- {"file-siz", require_arg, 's'},
- {"file-si", require_arg, 's'},
- {"file-s", require_arg, 's'},
- {"file", require_arg, 's'},
- {"fil", require_arg, 's'},
- {"fi", require_arg, 's'},
- {"max-buffer-size", require_arg, 'B'},
- {"max-buffer-siz", require_arg, 'B'},
- {"max-buffer-si", require_arg, 'B'},
- {"max-buffer-s", require_arg, 'B'},
- {"max-buffer", require_arg, 'B'},
- {"max-buffe", require_arg, 'B'},
- {"max-buff", require_arg, 'B'},
- {"max-buf", require_arg, 'B'},
- {"max-bu", require_arg, 'B'},
- {"max-b", require_arg, 'B'},
- {"max", require_arg, 'B'},
- {"min-buffer-size", require_arg, 'b'},
- {"min-buffer-siz", require_arg, 'b'},
- {"min-buffer-si", require_arg, 'b'},
- {"min-buffer-s", require_arg, 'b'},
- {"min-buffer", require_arg, 'b'},
- {"min-buffe", require_arg, 'b'},
- {"min-buff", require_arg, 'b'},
- {"min-buf", require_arg, 'b'},
- {"min-bu", require_arg, 'b'},
- {"min-b", require_arg, 'b'},
- {"min", require_arg, 'b'},
- {"prefix", require_arg, 'p'},
- {"prefi", require_arg, 'p'},
- {"pref", require_arg, 'p'},
- {"pre", require_arg, 'p'},
- {"pr", require_arg, 'p'},
- {"random-test", no_arg, 'r'},
- {"random-tes", no_arg, 'r'},
- {"random-te", no_arg, 'r'},
- {"random-t", no_arg, 'r'},
- {"random", no_arg, 'r'},
- {"rando", no_arg, 'r'},
- {"rand", no_arg, 'r'},
- {"ran", no_arg, 'r'},
- {"ra", no_arg, 'r'},
- {NULL, 0, '\0'}};
+static const char * s_opts = "hB:b:c:p:rs:0123456789";
+static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'},
+ {"compressability", require_arg, 'c'},
+ {"compressabilit", require_arg, 'c'},
+ {"compressabili", require_arg, 'c'},
+ {"compressabil", require_arg, 'c'},
+ {"compressabi", require_arg, 'c'},
+ {"compressab", require_arg, 'c'},
+ {"compressa", require_arg, 'c'},
+ {"compress", require_arg, 'c'},
+ {"compres", require_arg, 'c'},
+ {"compre", require_arg, 'c'},
+ {"compr", require_arg, 'c'},
+ {"comp", require_arg, 'c'},
+ {"com", require_arg, 'c'},
+ {"co", require_arg, 'c'},
+ {"file-size", require_arg, 's'},
+ {"file-siz", require_arg, 's'},
+ {"file-si", require_arg, 's'},
+ {"file-s", require_arg, 's'},
+ {"file", require_arg, 's'},
+ {"fil", require_arg, 's'},
+ {"fi", require_arg, 's'},
+ {"max-buffer-size", require_arg, 'B'},
+ {"max-buffer-siz", require_arg, 'B'},
+ {"max-buffer-si", require_arg, 'B'},
+ {"max-buffer-s", require_arg, 'B'},
+ {"max-buffer", require_arg, 'B'},
+ {"max-buffe", require_arg, 'B'},
+ {"max-buff", require_arg, 'B'},
+ {"max-buf", require_arg, 'B'},
+ {"max-bu", require_arg, 'B'},
+ {"max-b", require_arg, 'B'},
+ {"max", require_arg, 'B'},
+ {"min-buffer-size", require_arg, 'b'},
+ {"min-buffer-siz", require_arg, 'b'},
+ {"min-buffer-si", require_arg, 'b'},
+ {"min-buffer-s", require_arg, 'b'},
+ {"min-buffer", require_arg, 'b'},
+ {"min-buffe", require_arg, 'b'},
+ {"min-buff", require_arg, 'b'},
+ {"min-buf", require_arg, 'b'},
+ {"min-bu", require_arg, 'b'},
+ {"min-b", require_arg, 'b'},
+ {"min", require_arg, 'b'},
+ {"prefix", require_arg, 'p'},
+ {"prefi", require_arg, 'p'},
+ {"pref", require_arg, 'p'},
+ {"pre", require_arg, 'p'},
+ {"pr", require_arg, 'p'},
+ {"random-test", no_arg, 'r'},
+ {"random-tes", no_arg, 'r'},
+ {"random-te", no_arg, 'r'},
+ {"random-t", no_arg, 'r'},
+ {"random", no_arg, 'r'},
+ {"rando", no_arg, 'r'},
+ {"rand", no_arg, 'r'},
+ {"ran", no_arg, 'r'},
+ {"ra", no_arg, 'r'},
+ {NULL, 0, '\0'}};
/*
* Function: error
@@ -551,7 +551,7 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- while ((opt = get_option(argc, argv, s_opts, l_opts)) > 0) {
+ while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) > 0) {
switch ((char)opt) {
case '0':
case '1':
@@ -566,13 +566,13 @@ main(int argc, const char *argv[])
compress_level = opt - '0';
break;
case 'B':
- max_buf_size = parse_size_directive(opt_arg);
+ max_buf_size = parse_size_directive(H5_optarg);
break;
case 'b':
- min_buf_size = parse_size_directive(opt_arg);
+ min_buf_size = parse_size_directive(H5_optarg);
break;
case 'c':
- compress_percent = (int)HDstrtol(opt_arg, NULL, 10);
+ compress_percent = (int)HDstrtol(H5_optarg, NULL, 10);
if (compress_percent < 0)
compress_percent = 0;
@@ -581,13 +581,13 @@ main(int argc, const char *argv[])
break;
case 'p':
- option_prefix = opt_arg;
+ option_prefix = H5_optarg;
break;
case 'r':
random_test = TRUE;
break;
case 's':
- file_size = parse_size_directive(opt_arg);
+ file_size = parse_size_directive(H5_optarg);
break;
case '?':
usage();