summaryrefslogtreecommitdiffstats
path: root/tools/test/perform
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-03-21 04:31:41 (GMT)
committerGitHub <noreply@github.com>2023-03-21 04:31:41 (GMT)
commit7ed1deb00f6fdc49aa48632096a8596f55cdf57f (patch)
tree1c89ae08b77ef78660ce87690e617fe3999f608f /tools/test/perform
parentf1e7081cc28b3af0077af71605df7320aa1b9312 (diff)
downloadhdf5-7ed1deb00f6fdc49aa48632096a8596f55cdf57f.zip
hdf5-7ed1deb00f6fdc49aa48632096a8596f55cdf57f.tar.gz
hdf5-7ed1deb00f6fdc49aa48632096a8596f55cdf57f.tar.bz2
Remove perf tool and standalone h5perf builds (#2619)
The small perf tool conflicts with the standard perf tool and is being removed from all HDF5 releases. Building h5perf in "standalone" mode (i.e., independently of the library) has been broken for some time, so the build code for that has also been removed.
Diffstat (limited to 'tools/test/perform')
-rw-r--r--tools/test/perform/CMakeLists.txt36
-rw-r--r--tools/test/perform/CMakeTests.cmake27
-rw-r--r--tools/test/perform/build_h5perf_alone.sh25
-rw-r--r--tools/test/perform/build_h5perf_serial_alone.sh25
-rw-r--r--tools/test/perform/chunk.c3
-rw-r--r--tools/test/perform/direct_write_perf.c31
-rw-r--r--tools/test/perform/iopipe.c2
-rw-r--r--tools/test/perform/overhead.c6
-rw-r--r--tools/test/perform/perf_meta.c14
-rw-r--r--tools/test/perform/pio_standalone.c159
-rw-r--r--tools/test/perform/pio_standalone.h493
-rw-r--r--tools/test/perform/sio_standalone.c159
-rw-r--r--tools/test/perform/sio_standalone.h508
-rw-r--r--tools/test/perform/zip_perf.c8
14 files changed, 30 insertions, 1466 deletions
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index eed545b..268acbb 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -1,39 +1,9 @@
cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_PERFORM C)
-# --------------------------------------------------------------------
-# Add the executables
-# --------------------------------------------------------------------
-
-if (HDF5_BUILD_PERFORM_STANDALONE)
- #-- Adding test for h5perf_serial_alone - io_timer.c includes
- set (h5perf_serial_alone_SOURCES
- ${HDF5_TOOLS_DIR}/lib/io_timer.c
- ${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR}/sio_perf.c
- ${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR}/sio_engine.c
- ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/sio_standalone.c
- )
- add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES})
- target_include_directories (h5perf_serial_alone PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_TOOLS_SRC_H5PERF_SOURCE_DIR};${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (h5perf_serial_alone STATIC)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
- else ()
- TARGET_C_PROPERTIES (h5perf_serial_alone SHARED)
- target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
- endif ()
- set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
- set_property (TARGET h5perf_serial_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE)
-
- #-----------------------------------------------------------------------------
- # Add Target to clang-format
- #-----------------------------------------------------------------------------
- if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_serial_alone_FORMAT h5perf_serial_alone)
- endif ()
-endif ()
-
-#-- Adding test for chunk
+#-----------------------------------------------------------------------------
+# chunk
+#-----------------------------------------------------------------------------
set (chunk_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk.c
)
diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake
index 17f4b48..ac6080b 100644
--- a/tools/test/perform/CMakeTests.cmake
+++ b/tools/test/perform/CMakeTests.cmake
@@ -29,6 +29,8 @@ if (HDF5_TEST_SERIAL)
COMMAND ${CMAKE_COMMAND}
-E remove
chunk.h5
+ direct_write.h5
+ unix.raw
iopipe.h5
iopipe.raw
x-diag-rd.dat
@@ -36,20 +38,6 @@ if (HDF5_TEST_SERIAL)
x-rowmaj-rd.dat
x-rowmaj-wr.dat
x-gnuplot
- h5perf_serial.txt
- h5perf_serial.txt.err
- chunk.txt
- chunk.txt.err
- iopipe.txt
- iopipe.txt.err
- overhead.txt
- overhead.txt.err
- perf_meta.txt
- perf_meta.txt.err
- zip_perf-h.txt
- zip_perf-h.txt.err
- zip_perf.txt
- zip_perf.txt.err
)
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -72,10 +60,6 @@ if (HDF5_TEST_SERIAL)
DEPENDS "PERFORM_h5perform-clearall-objects"
)
- if (HDF5_BUILD_PERFORM_STANDALONE)
- add_test (NAME PERFORM_h5perf_serial_alone COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial_alone>)
- endif ()
-
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME PERFORM_chunk COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:chunk>)
else ()
@@ -192,13 +176,6 @@ if (HDF5_TEST_SERIAL)
endif ()
if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
- if (UNIX)
- add_test (NAME MPI_TEST_PERFORM_perf COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:perf> ${MPIEXEC_POSTFLAGS})
- endif ()
-
add_test (NAME MPI_TEST_PERFORM_h5perf COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:h5perf> ${MPIEXEC_POSTFLAGS})
- if (HDF5_BUILD_PERFORM_STANDALONE)
- add_test (NAME MPI_TEST_PERFORM_h5perf_alone COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:h5perf_alone> ${MPIEXEC_POSTFLAGS})
- endif ()
endif ()
diff --git a/tools/test/perform/build_h5perf_alone.sh b/tools/test/perform/build_h5perf_alone.sh
deleted file mode 100644
index 0cbb119..0000000
--- a/tools/test/perform/build_h5perf_alone.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh -x
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-# Name: build_h5perf_alone.sh
-#
-# Puporse: Build the h5perf tool by standalone mode.
-#
-# Created: Albert Cheng, 2005/09/18
-#
-# Modification:
-#
-
-# Default to use h5pcc to build h5perf unless $H5CC is defined.
-#
-h5pcc=${H5CC:-h5pcc}
-$h5pcc -DSTANDALONE pio_perf.c pio_engine.c pio_timer.c -o h5perf
diff --git a/tools/test/perform/build_h5perf_serial_alone.sh b/tools/test/perform/build_h5perf_serial_alone.sh
deleted file mode 100644
index 06909d0..0000000
--- a/tools/test/perform/build_h5perf_serial_alone.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh -x
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-# Name: build_h5perf_serial_alone.sh
-#
-# Puporse: Build the h5perf_serial tool by standalone mode.
-#
-# Created: Christian Chilan, 2008/09/02
-#
-# Modification:
-#
-
-# Default to use h5cc to build h5perf_serial unless $H5CC is defined.
-#
-h5cc=${H5CC:-h5cc}
-$h5cc -DSTANDALONE sio_perf.c sio_engine.c sio_timer.c -o h5perf_serial
diff --git a/tools/test/perform/chunk.c b/tools/test/perform/chunk.c
index e4a25ab..27ada87 100644
--- a/tools/test/perform/chunk.c
+++ b/tools/test/perform/chunk.c
@@ -20,15 +20,12 @@
*/
/* See H5private.h for how to include headers */
-#undef NDEBUG
#include "hdf5.h"
-#ifdef H5_STDC_HEADERS
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#endif
/* Solaris Studio defines attribute, but for the attributes we need */
#if !defined(H5_HAVE_ATTRIBUTE) || defined __cplusplus || defined(__SUNPRO_C)
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c
index f142d0a..0d94cf5 100644
--- a/tools/test/perform/direct_write_perf.c
+++ b/tools/test/perform/direct_write_perf.c
@@ -22,31 +22,27 @@
#if !defined(WIN32) && !defined(__MINGW32__)
-#include <math.h>
-
-#ifdef H5_STDC_HEADERS
#include <errno.h>
#include <fcntl.h>
+#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#endif
-
-#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)
+#ifdef H5_HAVE_SYS_TIME_H
#include <sys/time.h>
-#include <time.h>
-#elif defined(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};
@@ -54,8 +50,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*"); \
@@ -659,7 +654,7 @@ main(void)
hid_t fapl = H5P_DEFAULT;
int i;
- sprintf(filename, "%s.h5", FILENAME[0]);
+ snprintf(filename, sizeof(filename), "%s.h5", FILENAME[0]);
create_file(fapl);
test_direct_write_uncompressed_data(fapl);
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 8e09308..b8ce4c0 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -94,7 +94,6 @@ print_stats(const char *prefix,
static void
synchronize(void)
{
-#ifdef H5_HAVE_SYSTEM
#if defined(H5_HAVE_WIN32_API) && !defined(__CYGWIN__)
_flushall();
#else
@@ -106,7 +105,6 @@ synchronize(void)
status = HDsystem("df >/dev/null");
HDassert(status >= 0);
#endif
-#endif
}
/*-------------------------------------------------------------------------
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 5a4c533..eb57408 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -22,17 +22,11 @@
#include "hdf5.h"
#include "H5private.h"
-#ifdef H5_STDC_HEADERS
#include <ctype.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <string.h>
-#endif
-
-#ifdef H5_HAVE_IO_H
-#include <io.h>
-#endif
#ifdef H5_HAVE_UNISTD_H
#include <sys/types.h>
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index f60f82f..94fe849 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -303,7 +303,7 @@ create_dsets(hid_t file)
* Create a dataset using the default dataset creation properties.
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
goto error;
@@ -365,14 +365,14 @@ create_attrs_1(void)
* Create all(user specifies the number) attributes for each dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
open_t.start = retrieve_time();
if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for (j = 0; j < NUM_ATTRS; j++) {
- HDsprintf(attr_name, "all attrs for each dset %d", j);
+ HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -467,7 +467,7 @@ create_attrs_2(void)
* Create all(user specifies the number) attributes for each new dataset
*/
for (i = 0; i < NUM_DSETS; i++) {
- HDsprintf(dset_name, "dataset %d", i);
+ HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", i);
create_t.start = retrieve_time();
if ((dataset = H5Dcreate2(file, dset_name, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -475,7 +475,7 @@ create_attrs_2(void)
perf(&create_t, create_t.start, retrieve_time());
for (j = 0; j < NUM_ATTRS; j++) {
- HDsprintf(attr_name, "all attrs for each dset %d", j);
+ HDsnprintf(attr_name, sizeof(attr_name), "all attrs for each dset %d", j);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
@@ -578,14 +578,14 @@ create_attrs_3(void)
for (i = 0; i < loop_num; i++) {
for (j = 0; j < NUM_DSETS; j++) {
- HDsprintf(dset_name, "dataset %d", j);
+ HDsnprintf(dset_name, sizeof(dset_name), "dataset %d", j);
open_t.start = retrieve_time();
if ((dataset = H5Dopen2(file, dset_name, H5P_DEFAULT)) < 0)
goto error;
perf(&open_t, open_t.start, retrieve_time());
for (k = 0; k < BATCH_ATTRS; k++) {
- HDsprintf(attr_name, "some attrs for each dset %d %d", i, k);
+ HDsnprintf(attr_name, sizeof(attr_name), "some attrs for each dset %d %d", i, k);
attr_t.start = retrieve_time();
if ((attr = H5Acreate2(dataset, attr_name, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT,
H5P_DEFAULT)) < 0)
diff --git a/tools/test/perform/pio_standalone.c b/tools/test/perform/pio_standalone.c
deleted file mode 100644
index b4680a4..0000000
--- a/tools/test/perform/pio_standalone.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* This file contains the definition of functions required to build h5perf in
- * STANDALONE mode.
- * Created: Christian Chilan, 2005/5/18.
- */
-
-#include "pio_perf.h"
-
-/** From h5tools_utils.c **/
-
-/* global variables */
-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
-get_option(int argc, const char *const *argv, const char *opts, const struct 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') {
- return EOF;
- }
- else if (HDstrcmp(argv[opt_ind], "--") == 0) {
- opt_ind++;
- return EOF;
- }
- }
-
- if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') {
- /* long command line option */
- const char *arg = &argv[opt_ind][2];
- int i;
-
- for (i = 0; l_opts && l_opts[i].name; i++) {
- size_t len = HDstrlen(l_opts[i].name);
-
- if (HDstrncmp(arg, l_opts[i].name, len) == 0) {
- /* we've found a matching long command line flag */
- opt_opt = l_opts[i].shortval;
-
- if (l_opts[i].has_arg != no_arg) {
- if (arg[len] == '=') {
- opt_arg = &arg[len + 1];
- }
- else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') {
- opt_arg = argv[++opt_ind];
- }
- else if (l_opts[i].has_arg == require_arg) {
- if (opt_err)
- HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
-
- opt_opt = '?';
- }
- }
- else {
- if (arg[len] == '=') {
- if (opt_err)
- HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
-
- opt_opt = '?';
- }
-
- opt_arg = NULL;
- }
-
- break;
- }
- }
-
- if (l_opts[i].name == NULL) {
- /* exhausted all of the l_opts we have and still didn't match */
- if (opt_err)
- HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
-
- opt_opt = '?';
- }
-
- opt_ind++;
- sp = 1;
- }
- else {
- register char *cp; /* pointer into current token */
-
- /* short command line option */
- opt_opt = argv[opt_ind][sp];
-
- if (opt_opt == ':' || (cp = strchr(opts, opt_opt)) == 0) {
-
- if (opt_err)
- 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++;
- sp = 1;
- }
-
- return '?';
- }
-
- if (*++cp == ':') {
- /* if a value is expected, get it */
- if (argv[opt_ind][sp + 1] != '\0') {
- /* flag value is rest of current token */
- opt_arg = &argv[opt_ind++][sp + 1];
- }
- else if (++opt_ind >= argc) {
- if (opt_err)
- 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++];
- }
-
- sp = 1;
- }
- else {
- /* set up to look at next char in token, next time */
- if (argv[opt_ind][++sp] == '\0') {
- /* no more in current token, so setup next token */
- opt_ind++;
- sp = 1;
- }
-
- opt_arg = NULL;
- }
- }
-
- /* return the current flag character found */
- return opt_opt;
-}
-
-void
-print_version(const char *progname)
-{
- printf("%s: Version %u.%u.%u%s%s\n", progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
- H5_VERS_SUBRELEASE[0] ? "-" : "", H5_VERS_SUBRELEASE);
-}
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
deleted file mode 100644
index 093247c..0000000
--- a/tools/test/perform/pio_standalone.h
+++ /dev/null
@@ -1,493 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef PIO_STANDALONE_H
-#define PIO_STANDALONE_H
-
-/* Header file for building h5perf by standalone mode.
- * Created: Christian Chilan, 2005/5/18.
- */
-
-/** From H5private.h **/
-
-#include "H5public.h" /* Include Public Definitions */
-
-/*
- * Include ANSI-C header files.
- */
-#ifdef H5_STDC_HEADERS
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-/*
- * Redefine all the POSIX functions. We should never see a POSIX
- * function (or any other non-HDF5 function) in the source!
- */
-#define HDabort() abort()
-#define HDabs(X) abs(X)
-#ifdef H5_HAVE_WIN32_API
-#define HDaccess(F, M) _access(F, M)
-#define R_OK 4 /* Test for read permission. */
-#define W_OK 2 /* Test for write permission. */
-#define X_OK 1 /* Test for execute permission. */
-#define F_OK 0 /* Test for existence. */
-#else /* H5_HAVE_WIN32_API */
-#define HDaccess(F, M) access(F, M)
-#ifndef F_OK
-#define F_OK 00
-#define W_OK 02
-#define R_OK 04
-#endif
-#endif /* H5_HAVE_WIN32_API */
-#define HDacos(X) acos(X)
-#ifdef H5_HAVE_ALARM
-#define HDalarm(N) alarm(N)
-#else /* H5_HAVE_ALARM */
-#define HDalarm(N) (0)
-#endif /* H5_HAVE_ALARM */
-#define HDasctime(T) asctime(T)
-#define HDasin(X) asin(X)
-#define HDasprintf asprintf /*varargs*/
-#define HDassert(X) assert(X)
-#define HDatan(X) atan(X)
-#define HDatan2(X, Y) atan2(X, Y)
-#define HDatexit(F) atexit(F)
-#define HDatof(S) atof(S)
-#define HDatoi(S) atoi(S)
-#define HDatol(S) atol(S)
-#define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F)
-#define HDcalloc(N, Z) calloc(N, Z)
-#define HDceil(X) ceil(X)
-#define HDcfgetispeed(T) cfgetispeed(T)
-#define HDcfgetospeed(T) cfgetospeed(T)
-#define HDcfsetispeed(T, S) cfsetispeed(T, S)
-#define HDcfsetospeed(T, S) cfsetospeed(T, S)
-#define HDchdir(S) chdir(S)
-#define HDchmod(S, M) chmod(S, M)
-#define HDchown(S, O, G) chown(S, O, G)
-#define HDclearerr(F) clearerr(F)
-#define HDclock() clock()
-#define HDclose(F) close(F)
-#define HDclosedir(D) closedir(D)
-#define HDcos(X) cos(X)
-#define HDcosh(X) cosh(X)
-#define HDcreat(S, M) creat(S, M)
-#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)
-/* fcntl() variable arguments */
-#define HDfdopen(N, S) fdopen(N, S)
-#define HDfeof(F) feof(F)
-#define HDferror(F) ferror(F)
-#define HDfflush(F) fflush(F)
-#define HDfgetc(F) fgetc(F)
-#define HDfgetpos(F, P) fgetpos(F, P)
-#define HDfgets(S, N, F) fgets(S, N, F)
-#ifdef H5_HAVE_WIN32_API
-#define HDfileno(F) _fileno(F)
-#else /* H5_HAVE_WIN32_API */
-#define HDfileno(F) fileno(F)
-#endif /* H5_HAVE_WIN32_API */
-#define HDfloor(X) floor(X)
-#define HDfmod(X, Y) fmod(X, Y)
-#define HDfopen(S, M) fopen(S, M)
-#define HDfork() fork()
-#define HDfpathconf(F, N) fpathconf(F, N)
-#define HDfprintf fprintf
-#define HDfputc(C, F) fputc(C, F)
-#define HDfputs(S, F) fputs(S, F)
-#define HDfread(M, Z, N, F) fread(M, Z, N, F)
-#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 */
-/* fscanf() variable arguments */
-#ifdef H5_HAVE_FSEEKO
-#define HDfseek(F, O, W) fseeko(F, O, W)
-#else
-#define HDfseek(F, O, W) fseek(F, O, W)
-#endif
-#define HDfsetpos(F, P) fsetpos(F, P)
-/* definitions related to the file stat utilities.
- * Windows have its own function names.
- * For Unix, if off_t is not 64bit big, try use the pseudo-standard
- * xxx64 versions if available.
- */
-#ifdef H5_HAVE_WIN32_API
-#define HDfstat(F, B) _fstati64(F, B)
-#define HDlstat(S, B) _lstati64(S, B)
-#define HDstat(S, B) _stati64(S, B)
-typedef struct _stati64 h5_stat_t;
-typedef __int64 h5_stat_size_t;
-#define HDoff_t __int64
-#elif H5_SIZEOF_OFF_T != 8 && H5_SIZEOF_OFF64_T == 8 && defined(H5_HAVE_STAT64)
-#define HDfstat(F, B) fstat64(F, B)
-#define HDlstat(S, B) lstat64(S, B)
-#define HDstat(S, B) stat64(S, B)
-typedef struct stat64 h5_stat_t;
-typedef off64_t h5_stat_size_t;
-#define HDoff_t off64_t
-#else
-#define HDfstat(F, B) fstat(F, B)
-#define HDlstat(S, B) lstat(S, B)
-#define HDstat(S, B) stat(S, B)
-typedef struct stat h5_stat_t;
-typedef off_t h5_stat_size_t;
-#define HDoff_t off_t
-#endif
-
-#define HDftell(F) ftell(F)
-#define HDftruncate(F, L) ftruncate(F, L)
-#define HDfwrite(M, Z, N, F) fwrite(M, Z, N, F)
-#define HDgetc(F) getc(F)
-#define HDgetchar() getchar()
-#define HDgetcwd(S, Z) getcwd(S, Z)
-#define HDgetegid() getegid()
-#define HDgetenv(S) getenv(S)
-#define HDgeteuid() geteuid()
-#define HDgetgid() getgid()
-#define HDgetgrgid(G) getgrgid(G)
-#define HDgetgrnam(S) getgrnam(S)
-#define HDgetgroups(Z, G) getgroups(Z, G)
-#ifdef H5_HAVE_WIN32_API
-#define HDgetlogin() Wgetlogin()
-#else /* H5_HAVE_WIN32_API */
-#define HDgetlogin() getlogin()
-#endif /* H5_HAVE_WIN32_API */
-#define HDgetpgrp() getpgrp()
-#define HDgetpid() getpid()
-#define HDgetppid() getppid()
-#define HDgetpwnam(S) getpwnam(S)
-#define HDgetpwuid(U) getpwuid(U)
-#define HDgetrusage(X, S) getrusage(X, S)
-/* Don't define a macro for gets() - it was removed in C11 */
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
-#define HDgettimeofday(V, Z) Wgettimeofday(V, Z)
-#else /* H5_HAVE_WIN32_API */
-#define HDgettimeofday(S, P) gettimeofday(S, P)
-#endif /* H5_HAVE_WIN32_API */
-#define HDgetuid() getuid()
-#define HDgmtime(T) gmtime(T)
-#define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/
-#define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/
-#define HDisatty(F) isatty(F)
-#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/
-#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/
-#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/
-#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/
-#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/
-#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/
-#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/
-#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/
-#define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/
-#define HDkill(P, S) kill(P, S)
-#define HDlabs(X) labs(X)
-#define HDldexp(X, N) ldexp(X, N)
-#define HDldiv(X, Y) ldiv(X, Y)
-#define HDlink(OLD, NEW) link(OLD, NEW)
-#define HDlocaleconv() localeconv()
-#define HDlocaltime(T) localtime(T)
-#define HDlog(X) log(X)
-#define HDlog10(X) log10(X)
-#define HDlongjmp(J, N) longjmp(J, N)
-#ifdef H5_HAVE_WIN32_API
-#define HDlseek(F, O, W) _lseeki64(F, O, W)
-#else
-#ifdef H5_HAVE_LSEEK64
-#define HDlseek(F, O, W) lseek64(F, O, W)
-#else
-#define HDlseek(F, O, W) lseek(F, O, W)
-#endif
-#endif
-#define HDmalloc(Z) malloc(Z)
-#define HDposix_memalign(P, A, Z) posix_memalign(P, A, Z)
-#define HDmblen(S, N) mblen(S, N)
-#define HDmbstowcs(P, S, Z) mbstowcs(P, S, Z)
-#define HDmbtowc(P, S, Z) mbtowc(P, S, Z)
-#define HDmemchr(S, C, Z) memchr(S, C, Z)
-#define HDmemcmp(X, Y, Z) memcmp(X, Y, Z)
-/*
- * The (char*) casts are required for the DEC when optimizations are turned
- * on and the source and/or destination are not aligned.
- */
-#define HDmemcpy(X, Y, Z) memcpy((char *)(X), (const char *)(Y), Z)
-#define HDmemmove(X, Y, Z) memmove((char *)(X), (const char *)(Y), Z)
-/*
- * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO
- */
-#ifdef H5_HAVE_VISUAL_STUDIO
-#define HDmemset(X, C, Z) memset((void *)(X), C, Z)
-#else /* H5_HAVE_VISUAL_STUDIO */
-#define HDmemset(X, C, Z) memset(X, C, Z)
-#endif /* H5_HAVE_VISUAL_STUDIO */
-#ifdef H5_HAVE_WIN32_API
-#define HDmkdir(S, M) _mkdir(S)
-#else /* H5_HAVE_WIN32_API */
-#define HDmkdir(S, M) mkdir(S, M)
-#endif /* H5_HAVE_WIN32_API */
-#define HDmkfifo(S, M) mkfifo(S, M)
-#define HDmktime(T) mktime(T)
-#define HDmodf(X, Y) modf(X, Y)
-#ifdef _O_BINARY
-#define HDopen(S, F, M) open(S, F | _O_BINARY, M)
-#else
-#define HDopen(S, F, M) open(S, F, M)
-#endif
-#define HDopendir(S) opendir(S)
-#define HDpathconf(S, N) pathconf(S, N)
-#define HDpause() pause()
-#define HDperror(S) perror(S)
-#define HDpipe(F) pipe(F)
-#define HDpow(X, Y) pow(X, Y)
-/* printf() variable arguments */
-#define HDprintf(...) HDfprintf(stdout, __VA_ARGS__)
-#define HDputc(C, F) putc(C, F)
-#define HDputchar(C) putchar(C)
-#define HDputs(S) puts(S)
-#define HDqsort(M, N, Z, F) qsort(M, N, Z, F)
-#define HDraise(N) raise(N)
-
-#ifdef H5_HAVE_RAND_R
-#define HDrandom() HDrand()
-H5_DLL int HDrand(void);
-#elif H5_HAVE_RANDOM
-#define HDrand() random()
-#define HDrandom() random()
-#else
-#define HDrand() rand()
-#define HDrandom() rand()
-#endif
-
-#define HDread(F, M, Z) read(F, M, Z)
-#define HDreaddir(D) readdir(D)
-#define HDrealloc(M, Z) realloc(M, Z)
-#define HDremove(S) remove(S)
-#define HDrename(OLD, NEW) rename(OLD, NEW)
-#define HDrewind(F) rewind(F)
-#define HDrewinddir(D) rewinddir(D)
-#define HDrmdir(S) rmdir(S)
-/* scanf() variable arguments */
-#define HDsetbuf(F, S) setbuf(F, S)
-#define HDsetgid(G) setgid(G)
-#define HDsetjmp(J) setjmp(J)
-#define HDsetlocale(N, S) setlocale(N, S)
-#define HDsetpgid(P, PG) setpgid(P, PG)
-#define HDsetsid() setsid()
-#define HDsetuid(U) setuid(U)
-/* Windows does not permit setting the buffer size to values
- less than 2. */
-#ifndef H5_HAVE_WIN32_API
-#define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, Z)
-#else
-#define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, (Z > 1 ? Z : 2))
-#endif
-#define HDsigaddset(S, N) sigaddset(S, N)
-#define HDsigdelset(S, N) sigdelset(S, N)
-#define HDsigemptyset(S) sigemptyset(S)
-#define HDsigfillset(S) sigfillset(S)
-#define HDsigismember(S, N) sigismember(S, N)
-#define HDsiglongjmp(J, N) siglongjmp(J, N)
-#define HDsignal(N, F) signal(N, F)
-#define HDsigpending(S) sigpending(S)
-#define HDsigprocmask(H, S, O) sigprocmask(H, S, O)
-#define HDsigsetjmp(J, N) sigsetjmp(J, N)
-#define HDsigsuspend(S) sigsuspend(S)
-#define HDsin(X) sin(X)
-#define HDsinh(X) sinh(X)
-#define HDsleep(N) sleep(N)
-#define HDsnprintf snprintf /*varargs*/
-#define HDsprintf sprintf /*varargs*/
-#define HDsqrt(X) sqrt(X)
-#ifdef H5_HAVE_RAND_R
-H5_DLL void HDsrand(unsigned int seed);
-#define HDsrandom(S) HDsrand(S)
-#elif H5_HAVE_RANDOM
-#define HDsrand(S) srandom(S)
-#define HDsrandom(S) srandom(S)
-#else
-#define HDsrand(S) srand(S)
-#define HDsrandom(S) srand(S)
-#endif
-
-#ifdef H5_HAVE_WIN32_API
-#define HDstrcasecmp(A, B) _stricmp(A, B)
-#else
-#define HDstrcasecmp(X, Y) strcasecmp(X, Y)
-#endif
-#define HDstrcat(X, Y) strcat(X, Y)
-#define HDstrchr(S, C) strchr(S, C)
-#define HDstrcmp(X, Y) strcmp(X, Y)
-#define HDstrcoll(X, Y) strcoll(X, Y)
-#define HDstrcpy(X, Y) strcpy(X, Y)
-#define HDstrcspn(X, Y) strcspn(X, Y)
-#define HDstrerror(N) strerror(N)
-#define HDstrftime(S, Z, F, T) strftime(S, Z, F, T)
-#define HDstrlen(S) strlen(S)
-#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
-#define HDstrncmp(X, Y, Z) strncmp(X, Y, Z)
-#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
-#define HDstrpbrk(X, Y) strpbrk(X, Y)
-#define HDstrrchr(S, C) strrchr(S, C)
-#define HDstrspn(X, Y) strspn(X, Y)
-#define HDstrstr(X, Y) strstr(X, Y)
-#define HDstrtod(S, R) strtod(S, R)
-#define HDstrtok(X, Y) strtok(X, Y)
-#define HDstrtol(S, R, N) strtol(S, R, N)
-H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
-#define HDstrtoul(S, R, N) strtoul(S, R, N)
-#ifdef H5_HAVE_WIN32_API
-#define HDstrtoull(S, R, N) _strtoui64(S, R, N)
-#else
-#define HDstrtoull(S, R, N) strtoull(S, R, N)
-#endif
-#define HDstrxfrm(X, Y, Z) strxfrm(X, Y, Z)
-#define HDsysconf(N) sysconf(N)
-#define HDsystem(S) system(S)
-#define HDtan(X) tan(X)
-#define HDtanh(X) tanh(X)
-#define HDtcdrain(F) tcdrain(F)
-#define HDtcflow(F, A) tcflow(F, A)
-#define HDtcflush(F, N) tcflush(F, N)
-#define HDtcgetattr(F, T) tcgetattr(F, T)
-#define HDtcgetpgrp(F) tcgetpgrp(F)
-#define HDtcsendbreak(F, N) tcsendbreak(F, N)
-#define HDtcsetattr(F, O, T) tcsetattr(F, O, T)
-#define HDtcsetpgrp(F, N) tcsetpgrp(F, N)
-#define HDtime(T) time(T)
-#define HDtimes(T) times(T)
-#define HDtmpfile() tmpfile()
-#define HDtmpnam(S) tmpnam(S)
-#define HDtolower(C) tolower(C)
-#define HDtoupper(C) toupper(C)
-#define HDttyname(F) ttyname(F)
-#define HDtzset() tzset()
-#define HDumask(N) umask(N)
-#define HDuname(S) uname(S)
-#define HDungetc(C, F) ungetc(C, F)
-#ifdef H5_HAVE_WIN32_API
-#define HDunlink(S) _unlink(S)
-#else
-#define HDunlink(S) unlink(S)
-#endif
-#define HDutime(S, T) utime(S, T)
-#define HDva_arg(A, T) va_arg(A, T)
-#define HDva_end(A) va_end(A)
-#define HDva_start(A, P) va_start(A, P)
-#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#define HDwait(W) wait(W)
-#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#define HDwctomb(S, C) wctomb(S, C)
-#define HDwrite(F, M, Z) write(F, M, Z)
-
-/*
- * And now for a couple non-Posix functions... Watch out for systems that
- * define these in terms of macros.
- */
-#ifdef H5_HAVE_WIN32_API
-#define HDstrdup(S) _strdup(S)
-#else /* H5_HAVE_WIN32_API */
-
-#if !defined strdup && !defined H5_HAVE_STRDUP
-extern char *strdup(const char *s);
-#endif
-
-#define HDstrdup(S) strdup(S)
-
-#endif /* H5_HAVE_WIN32_API */
-
-/*
- * HDF Boolean type.
- */
-#ifndef FALSE
-#define FALSE false
-#endif
-#ifndef TRUE
-#define TRUE true
-#endif
-
-/** 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) */
-
-enum h5_arg_level {
- no_arg = 0, /* doesn't take an argument */
- require_arg, /* requires an argument */
- optional_arg /* argument is optional */
-};
-
-struct 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 *const *argv, const char *opt, const struct long_options *l_opt);
-
-extern int nCols; /*max number of columns for outputting */
-
-/* Definitions of useful routines */
-extern void print_version(const char *progname);
-
-#endif
diff --git a/tools/test/perform/sio_standalone.c b/tools/test/perform/sio_standalone.c
deleted file mode 100644
index 21a2fb5..0000000
--- a/tools/test/perform/sio_standalone.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* This file contains the definition of functions required to build h5perf in
- * STANDALONE mode.
- * Created: Christian Chilan, 2005/5/18.
- */
-
-#include "sio_perf.h"
-
-/** From h5tools_utils.c **/
-
-/* global variables */
-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
-get_option(int argc, const char *const *argv, const char *opts, const struct 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') {
- return EOF;
- }
- else if (HDstrcmp(argv[opt_ind], "--") == 0) {
- opt_ind++;
- return EOF;
- }
- }
-
- if (sp == 1 && argv[opt_ind][0] == '-' && argv[opt_ind][1] == '-') {
- /* long command line option */
- const char *arg = &argv[opt_ind][2];
- int i;
-
- for (i = 0; l_opts && l_opts[i].name; i++) {
- size_t len = HDstrlen(l_opts[i].name);
-
- if (HDstrncmp(arg, l_opts[i].name, len) == 0) {
- /* we've found a matching long command line flag */
- opt_opt = l_opts[i].shortval;
-
- if (l_opts[i].has_arg != no_arg) {
- if (arg[len] == '=') {
- opt_arg = &arg[len + 1];
- }
- else if (opt_ind < (argc - 1) && argv[opt_ind + 1][0] != '-') {
- opt_arg = argv[++opt_ind];
- }
- else if (l_opts[i].has_arg == require_arg) {
- if (opt_err)
- HDfprintf(stderr, "%s: option required for \"--%s\" flag\n", argv[0], arg);
-
- opt_opt = '?';
- }
- }
- else {
- if (arg[len] == '=') {
- if (opt_err)
- HDfprintf(stderr, "%s: no option required for \"%s\" flag\n", argv[0], arg);
-
- opt_opt = '?';
- }
-
- opt_arg = NULL;
- }
-
- break;
- }
- }
-
- if (l_opts[i].name == NULL) {
- /* exhausted all of the l_opts we have and still didn't match */
- if (opt_err)
- HDfprintf(stderr, "%s: unknown option \"%s\"\n", argv[0], arg);
-
- opt_opt = '?';
- }
-
- opt_ind++;
- sp = 1;
- }
- else {
- register char *cp; /* pointer into current token */
-
- /* short command line option */
- opt_opt = argv[opt_ind][sp];
-
- if (opt_opt == ':' || (cp = strchr(opts, opt_opt)) == 0) {
-
- if (opt_err)
- 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++;
- sp = 1;
- }
-
- return '?';
- }
-
- if (*++cp == ':') {
- /* if a value is expected, get it */
- if (argv[opt_ind][sp + 1] != '\0') {
- /* flag value is rest of current token */
- opt_arg = &argv[opt_ind++][sp + 1];
- }
- else if (++opt_ind >= argc) {
- if (opt_err)
- 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++];
- }
-
- sp = 1;
- }
- else {
- /* set up to look at next char in token, next time */
- if (argv[opt_ind][++sp] == '\0') {
- /* no more in current token, so setup next token */
- opt_ind++;
- sp = 1;
- }
-
- opt_arg = NULL;
- }
- }
-
- /* return the current flag character found */
- return opt_opt;
-}
-
-void
-print_version(const char *progname)
-{
- printf("%s: Version %u.%u.%u%s%s\n", progname, H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE,
- H5_VERS_SUBRELEASE[0] ? "-" : "", H5_VERS_SUBRELEASE);
-}
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
deleted file mode 100644
index b46af62..0000000
--- a/tools/test/perform/sio_standalone.h
+++ /dev/null
@@ -1,508 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifndef SIO_STANDALONE_H
-#define SIO_STANDALONE_H
-
-/* Header file for building h5perf by standalone mode.
- * Created: Christian Chilan, 2005/5/18.
- */
-
-/** From H5private.h **/
-
-#include "H5public.h" /* Include Public Definitions */
-
-/*
- * Include ANSI-C header files.
- */
-#ifdef H5_STDC_HEADERS
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <float.h>
-#include <limits.h>
-#include <math.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-/* maximum of two, three, or four values */
-#undef MAX
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#define MAX2(a, b) MAX(a, b)
-#define MAX3(a, b, c) MAX(a, MAX(b, c))
-#define MAX4(a, b, c, d) MAX(MAX(a, b), MAX(c, d))
-
-#define H5_FLT_ABS_EQUAL(X, Y) (HDfabsf((X) - (Y)) < FLT_EPSILON)
-#define H5_DBL_ABS_EQUAL(X, Y) (HDfabs((X) - (Y)) < DBL_EPSILON)
-#define H5_LDBL_ABS_EQUAL(X, Y) (HDfabsl((X) - (Y)) < LDBL_EPSILON)
-
-#define H5_FLT_REL_EQUAL(X, Y, M) (HDfabsf(((Y) - (X)) / (X)) < (M))
-#define H5_DBL_REL_EQUAL(X, Y, M) (HDfabs(((Y) - (X)) / (X)) < (M))
-#define H5_LDBL_REL_EQUAL(X, Y, M) (HDfabsl(((Y) - (X)) / (X)) < (M))
-
-/*
- * Redefine all the POSIX functions. We should never see a POSIX
- * function (or any other non-HDF5 function) in the source!
- */
-#define HDabort() abort()
-#define HDabs(X) abs(X)
-#ifdef H5_HAVE_WIN32_API
-#define HDaccess(F, M) _access(F, M)
-#define R_OK 4 /* Test for read permission. */
-#define W_OK 2 /* Test for write permission. */
-#define X_OK 1 /* Test for execute permission. */
-#define F_OK 0 /* Test for existence. */
-#else /* H5_HAVE_WIN32_API */
-#define HDaccess(F, M) access(F, M)
-#ifndef F_OK
-#define F_OK 00
-#define W_OK 02
-#define R_OK 04
-#endif
-#endif /* H5_HAVE_WIN32_API */
-#define HDacos(X) acos(X)
-#ifdef H5_HAVE_ALARM
-#define HDalarm(N) alarm(N)
-#else /* H5_HAVE_ALARM */
-#define HDalarm(N) (0)
-#endif /* H5_HAVE_ALARM */
-#define HDasctime(T) asctime(T)
-#define HDasin(X) asin(X)
-#define HDasprintf asprintf /*varargs*/
-#define HDassert(X) assert(X)
-#define HDatan(X) atan(X)
-#define HDatan2(X, Y) atan2(X, Y)
-#define HDatexit(F) atexit(F)
-#define HDatof(S) atof(S)
-#define HDatoi(S) atoi(S)
-#define HDatol(S) atol(S)
-#define HDbsearch(K, B, N, Z, F) bsearch(K, B, N, Z, F)
-#define HDcalloc(N, Z) calloc(N, Z)
-#define HDceil(X) ceil(X)
-#define HDcfgetispeed(T) cfgetispeed(T)
-#define HDcfgetospeed(T) cfgetospeed(T)
-#define HDcfsetispeed(T, S) cfsetispeed(T, S)
-#define HDcfsetospeed(T, S) cfsetospeed(T, S)
-#define HDchdir(S) chdir(S)
-#define HDchmod(S, M) chmod(S, M)
-#define HDchown(S, O, G) chown(S, O, G)
-#define HDclearerr(F) clearerr(F)
-#define HDclock() clock()
-#define HDclose(F) close(F)
-#define HDclosedir(D) closedir(D)
-#define HDcos(X) cos(X)
-#define HDcosh(X) cosh(X)
-#define HDcreat(S, M) creat(S, M)
-#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)
-/* fcntl() variable arguments */
-#define HDfdopen(N, S) fdopen(N, S)
-#define HDfeof(F) feof(F)
-#define HDferror(F) ferror(F)
-#define HDfflush(F) fflush(F)
-#define HDfgetc(F) fgetc(F)
-#define HDfgetpos(F, P) fgetpos(F, P)
-#define HDfgets(S, N, F) fgets(S, N, F)
-#ifdef H5_HAVE_WIN32_API
-#define HDfileno(F) _fileno(F)
-#else /* H5_HAVE_WIN32_API */
-#define HDfileno(F) fileno(F)
-#endif /* H5_HAVE_WIN32_API */
-#define HDfloor(X) floor(X)
-#define HDfmod(X, Y) fmod(X, Y)
-#define HDfopen(S, M) fopen(S, M)
-#define HDfork() fork()
-#define HDfpathconf(F, N) fpathconf(F, N)
-#define HDfprintf fprintf
-#define HDfputc(C, F) fputc(C, F)
-#define HDfputs(S, F) fputs(S, F)
-#define HDfread(M, Z, N, F) fread(M, Z, N, F)
-#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 */
-/* fscanf() variable arguments */
-#ifdef H5_HAVE_FSEEKO
-#define HDfseek(F, O, W) fseeko(F, O, W)
-#else
-#define HDfseek(F, O, W) fseek(F, O, W)
-#endif
-#define HDfsetpos(F, P) fsetpos(F, P)
-/* definitions related to the file stat utilities.
- * Windows have its own function names.
- * For Unix, if off_t is not 64bit big, try use the pseudo-standard
- * xxx64 versions if available.
- */
-#ifdef H5_HAVE_WIN32_API
-#define HDfstat(F, B) _fstati64(F, B)
-#define HDlstat(S, B) _lstati64(S, B)
-#define HDstat(S, B) _stati64(S, B)
-typedef struct _stati64 h5_stat_t;
-typedef __int64 h5_stat_size_t;
-#define HDoff_t __int64
-#elif H5_SIZEOF_OFF_T != 8 && H5_SIZEOF_OFF64_T == 8 && defined(H5_HAVE_STAT64)
-#define HDfstat(F, B) fstat64(F, B)
-#define HDlstat(S, B) lstat64(S, B)
-#define HDstat(S, B) stat64(S, B)
-typedef struct stat64 h5_stat_t;
-typedef off64_t h5_stat_size_t;
-#define HDoff_t off64_t
-#else
-#define HDfstat(F, B) fstat(F, B)
-#define HDlstat(S, B) lstat(S, B)
-#define HDstat(S, B) stat(S, B)
-typedef struct stat h5_stat_t;
-typedef off_t h5_stat_size_t;
-#define HDoff_t off_t
-#endif
-
-#define HDftell(F) ftell(F)
-#define HDftruncate(F, L) ftruncate(F, L)
-#define HDfwrite(M, Z, N, F) fwrite(M, Z, N, F)
-#define HDgetc(F) getc(F)
-#define HDgetchar() getchar()
-#define HDgetcwd(S, Z) getcwd(S, Z)
-#define HDgetegid() getegid()
-#define HDgetenv(S) getenv(S)
-#define HDgeteuid() geteuid()
-#define HDgetgid() getgid()
-#define HDgetgrgid(G) getgrgid(G)
-#define HDgetgrnam(S) getgrnam(S)
-#define HDgetgroups(Z, G) getgroups(Z, G)
-#ifdef H5_HAVE_WIN32_API
-#define HDgetlogin() Wgetlogin()
-#else /* H5_HAVE_WIN32_API */
-#define HDgetlogin() getlogin()
-#endif /* H5_HAVE_WIN32_API */
-#define HDgetpgrp() getpgrp()
-#define HDgetpid() getpid()
-#define HDgetppid() getppid()
-#define HDgetpwnam(S) getpwnam(S)
-#define HDgetpwuid(U) getpwuid(U)
-#define HDgetrusage(X, S) getrusage(X, S)
-/* Don't define a macro for gets() - it was removed in C11 */
-#ifdef H5_HAVE_WIN32_API
-H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
-#define HDgettimeofday(V, Z) Wgettimeofday(V, Z)
-#else /* H5_HAVE_WIN32_API */
-#define HDgettimeofday(S, P) gettimeofday(S, P)
-#endif /* H5_HAVE_WIN32_API */
-#define HDgetuid() getuid()
-#define HDgmtime(T) gmtime(T)
-#define HDisalnum(C) isalnum((int)(C)) /*cast for solaris warning*/
-#define HDisalpha(C) isalpha((int)(C)) /*cast for solaris warning*/
-#define HDisatty(F) isatty(F)
-#define HDiscntrl(C) iscntrl((int)(C)) /*cast for solaris warning*/
-#define HDisdigit(C) isdigit((int)(C)) /*cast for solaris warning*/
-#define HDisgraph(C) isgraph((int)(C)) /*cast for solaris warning*/
-#define HDislower(C) islower((int)(C)) /*cast for solaris warning*/
-#define HDisprint(C) isprint((int)(C)) /*cast for solaris warning*/
-#define HDispunct(C) ispunct((int)(C)) /*cast for solaris warning*/
-#define HDisspace(C) isspace((int)(C)) /*cast for solaris warning*/
-#define HDisupper(C) isupper((int)(C)) /*cast for solaris warning*/
-#define HDisxdigit(C) isxdigit((int)(C)) /*cast for solaris warning*/
-#define HDkill(P, S) kill(P, S)
-#define HDlabs(X) labs(X)
-#define HDldexp(X, N) ldexp(X, N)
-#define HDldiv(X, Y) ldiv(X, Y)
-#define HDlink(OLD, NEW) link(OLD, NEW)
-#define HDlocaleconv() localeconv()
-#define HDlocaltime(T) localtime(T)
-#define HDlog(X) log(X)
-#define HDlog10(X) log10(X)
-#define HDlongjmp(J, N) longjmp(J, N)
-#ifdef H5_HAVE_WIN32_API
-#define HDlseek(F, O, W) _lseeki64(F, O, W)
-#else
-#ifdef H5_HAVE_LSEEK64
-#define HDlseek(F, O, W) lseek64(F, O, W)
-#else
-#define HDlseek(F, O, W) lseek(F, O, W)
-#endif
-#endif
-#define HDmalloc(Z) malloc(Z)
-#define HDposix_memalign(P, A, Z) posix_memalign(P, A, Z)
-#define HDmblen(S, N) mblen(S, N)
-#define HDmbstowcs(P, S, Z) mbstowcs(P, S, Z)
-#define HDmbtowc(P, S, Z) mbtowc(P, S, Z)
-#define HDmemchr(S, C, Z) memchr(S, C, Z)
-#define HDmemcmp(X, Y, Z) memcmp(X, Y, Z)
-/*
- * The (char*) casts are required for the DEC when optimizations are turned
- * on and the source and/or destination are not aligned.
- */
-#define HDmemcpy(X, Y, Z) memcpy((char *)(X), (const char *)(Y), Z)
-#define HDmemmove(X, Y, Z) memmove((char *)(X), (const char *)(Y), Z)
-/*
- * The (void*) cast just avoids a compiler warning in H5_HAVE_VISUAL_STUDIO
- */
-#ifdef H5_HAVE_VISUAL_STUDIO
-#define HDmemset(X, C, Z) memset((void *)(X), C, Z)
-#else /* H5_HAVE_VISUAL_STUDIO */
-#define HDmemset(X, C, Z) memset(X, C, Z)
-#endif /* H5_HAVE_VISUAL_STUDIO */
-#ifdef H5_HAVE_WIN32_API
-#define HDmkdir(S, M) _mkdir(S)
-#else /* H5_HAVE_WIN32_API */
-#define HDmkdir(S, M) mkdir(S, M)
-#endif /* H5_HAVE_WIN32_API */
-#define HDmkfifo(S, M) mkfifo(S, M)
-#define HDmktime(T) mktime(T)
-#define HDmodf(X, Y) modf(X, Y)
-#ifdef _O_BINARY
-#define HDopen(S, F, M) open(S, F | _O_BINARY, M)
-#else
-#define HDopen(S, F, M) open(S, F, M)
-#endif
-#define HDopendir(S) opendir(S)
-#define HDpathconf(S, N) pathconf(S, N)
-#define HDpause() pause()
-#define HDperror(S) perror(S)
-#define HDpipe(F) pipe(F)
-#define HDpow(X, Y) pow(X, Y)
-/* printf() variable arguments */
-#define HDprintf(...) HDfprintf(stdout, __VA_ARGS__)
-#define HDputc(C, F) putc(C, F)
-#define HDputchar(C) putchar(C)
-#define HDputs(S) puts(S)
-#define HDqsort(M, N, Z, F) qsort(M, N, Z, F)
-#define HDraise(N) raise(N)
-
-#ifdef H5_HAVE_RAND_R
-#define HDrandom() HDrand()
-H5_DLL int HDrand(void);
-#elif H5_HAVE_RANDOM
-#define HDrand() random()
-#define HDrandom() random()
-#else
-#define HDrand() rand()
-#define HDrandom() rand()
-#endif
-
-#define HDread(F, M, Z) read(F, M, Z)
-#define HDreaddir(D) readdir(D)
-#define HDrealloc(M, Z) realloc(M, Z)
-#define HDremove(S) remove(S)
-#define HDrename(OLD, NEW) rename(OLD, NEW)
-#define HDrewind(F) rewind(F)
-#define HDrewinddir(D) rewinddir(D)
-#define HDrmdir(S) rmdir(S)
-/* scanf() variable arguments */
-#define HDsetbuf(F, S) setbuf(F, S)
-#define HDsetgid(G) setgid(G)
-#define HDsetjmp(J) setjmp(J)
-#define HDsetlocale(N, S) setlocale(N, S)
-#define HDsetpgid(P, PG) setpgid(P, PG)
-#define HDsetsid() setsid()
-#define HDsetuid(U) setuid(U)
-/* Windows does not permit setting the buffer size to values
- less than 2. */
-#ifndef H5_HAVE_WIN32_API
-#define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, Z)
-#else
-#define HDsetvbuf(F, S, M, Z) setvbuf(F, S, M, (Z > 1 ? Z : 2))
-#endif
-#define HDsigaddset(S, N) sigaddset(S, N)
-#define HDsigdelset(S, N) sigdelset(S, N)
-#define HDsigemptyset(S) sigemptyset(S)
-#define HDsigfillset(S) sigfillset(S)
-#define HDsigismember(S, N) sigismember(S, N)
-#define HDsiglongjmp(J, N) siglongjmp(J, N)
-#define HDsignal(N, F) signal(N, F)
-#define HDsigpending(S) sigpending(S)
-#define HDsigprocmask(H, S, O) sigprocmask(H, S, O)
-#define HDsigsetjmp(J, N) sigsetjmp(J, N)
-#define HDsigsuspend(S) sigsuspend(S)
-#define HDsin(X) sin(X)
-#define HDsinh(X) sinh(X)
-#define HDsleep(N) sleep(N)
-#define HDsnprintf snprintf /*varargs*/
-#define HDsprintf sprintf /*varargs*/
-#define HDsqrt(X) sqrt(X)
-#ifdef H5_HAVE_RAND_R
-H5_DLL void HDsrand(unsigned int seed);
-#define HDsrandom(S) HDsrand(S)
-#elif H5_HAVE_RANDOM
-#define HDsrand(S) srandom(S)
-#define HDsrandom(S) srandom(S)
-#else
-#define HDsrand(S) srand(S)
-#define HDsrandom(S) srand(S)
-#endif
-
-#ifdef H5_HAVE_WIN32_API
-#define HDstrcasecmp(A, B) _stricmp(A, B)
-#else
-#define HDstrcasecmp(X, Y) strcasecmp(X, Y)
-#endif
-#define HDstrcat(X, Y) strcat(X, Y)
-#define HDstrchr(S, C) strchr(S, C)
-#define HDstrcmp(X, Y) strcmp(X, Y)
-#define HDstrcoll(X, Y) strcoll(X, Y)
-#define HDstrcpy(X, Y) strcpy(X, Y)
-#define HDstrcspn(X, Y) strcspn(X, Y)
-#define HDstrerror(N) strerror(N)
-#define HDstrftime(S, Z, F, T) strftime(S, Z, F, T)
-#define HDstrlen(S) strlen(S)
-#define HDstrncat(X, Y, Z) strncat(X, Y, Z)
-#define HDstrncmp(X, Y, Z) strncmp(X, Y, Z)
-#define HDstrncpy(X, Y, Z) strncpy(X, Y, Z)
-#define HDstrpbrk(X, Y) strpbrk(X, Y)
-#define HDstrrchr(S, C) strrchr(S, C)
-#define HDstrspn(X, Y) strspn(X, Y)
-#define HDstrstr(X, Y) strstr(X, Y)
-#define HDstrtod(S, R) strtod(S, R)
-#define HDstrtok(X, Y) strtok(X, Y)
-#define HDstrtol(S, R, N) strtol(S, R, N)
-H5_DLL int64_t HDstrtoll(const char *s, const char **rest, int base);
-#define HDstrtoul(S, R, N) strtoul(S, R, N)
-#ifdef H5_HAVE_WIN32_API
-#define HDstrtoull(S, R, N) _strtoui64(S, R, N)
-#else
-#define HDstrtoull(S, R, N) strtoull(S, R, N)
-#endif
-#define HDstrxfrm(X, Y, Z) strxfrm(X, Y, Z)
-#define HDsysconf(N) sysconf(N)
-#define HDsystem(S) system(S)
-#define HDtan(X) tan(X)
-#define HDtanh(X) tanh(X)
-#define HDtcdrain(F) tcdrain(F)
-#define HDtcflow(F, A) tcflow(F, A)
-#define HDtcflush(F, N) tcflush(F, N)
-#define HDtcgetattr(F, T) tcgetattr(F, T)
-#define HDtcgetpgrp(F) tcgetpgrp(F)
-#define HDtcsendbreak(F, N) tcsendbreak(F, N)
-#define HDtcsetattr(F, O, T) tcsetattr(F, O, T)
-#define HDtcsetpgrp(F, N) tcsetpgrp(F, N)
-#define HDtime(T) time(T)
-#define HDtimes(T) times(T)
-#define HDtmpfile() tmpfile()
-#define HDtmpnam(S) tmpnam(S)
-#define HDtolower(C) tolower(C)
-#define HDtoupper(C) toupper(C)
-#define HDttyname(F) ttyname(F)
-#define HDtzset() tzset()
-#define HDumask(N) umask(N)
-#define HDuname(S) uname(S)
-#define HDungetc(C, F) ungetc(C, F)
-#ifdef H5_HAVE_WIN32_API
-#define HDunlink(S) _unlink(S)
-#else
-#define HDunlink(S) unlink(S)
-#endif
-#define HDutime(S, T) utime(S, T)
-#define HDva_arg(A, T) va_arg(A, T)
-#define HDva_end(A) va_end(A)
-#define HDva_start(A, P) va_start(A, P)
-#define HDvasprintf(RET, FMT, A) vasprintf(RET, FMT, A)
-#define HDvfprintf(F, FMT, A) vfprintf(F, FMT, A)
-#define HDvprintf(FMT, A) vprintf(FMT, A)
-#define HDvsprintf(S, FMT, A) vsprintf(S, FMT, A)
-#define HDvsnprintf(S, N, FMT, A) vsnprintf(S, N, FMT, A)
-#define HDwait(W) wait(W)
-#define HDwaitpid(P, W, O) waitpid(P, W, O)
-#define HDwcstombs(S, P, Z) wcstombs(S, P, Z)
-#define HDwctomb(S, C) wctomb(S, C)
-#define HDwrite(F, M, Z) write(F, M, Z)
-
-/*
- * And now for a couple non-Posix functions... Watch out for systems that
- * define these in terms of macros.
- */
-#ifdef H5_HAVE_WIN32_API
-#define HDstrdup(S) _strdup(S)
-#else /* H5_HAVE_WIN32_API */
-
-#if !defined strdup && !defined H5_HAVE_STRDUP
-extern char *strdup(const char *s);
-#endif
-
-#define HDstrdup(S) strdup(S)
-
-#endif /* H5_HAVE_WIN32_API */
-
-/*
- * HDF Boolean type.
- */
-#ifndef FALSE
-#define FALSE false
-#endif
-#ifndef TRUE
-#define TRUE true
-#endif
-
-/** 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) */
-
-enum h5_arg_level {
- no_arg = 0, /* doesn't take an argument */
- require_arg, /* requires an argument */
- optional_arg /* argument is optional */
-};
-
-struct 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 *const *argv, const char *opt, const struct long_options *l_opt);
-
-extern int nCols; /*max number of columns for outputting */
-
-/* Definitions of useful routines */
-extern void print_version(const char *progname);
-
-#endif
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 7820582..3cfe2cc 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -86,7 +86,9 @@ error(const char *fmt, ...)
va_start(ap, fmt);
HDfprintf(stderr, "%s: error: ", prog);
+ H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(stderr, fmt, ap);
+ H5_GCC_CLANG_DIAG_ON("format-nonliteral")
HDfprintf(stderr, "\n");
va_end(ap);
HDexit(EXIT_FAILURE);
@@ -335,8 +337,8 @@ parse_size_directive(const char *size)
static void
fill_with_random_data(Bytef *src, uLongf src_len)
{
- register unsigned u;
- h5_stat_t stat_buf;
+ unsigned u;
+ h5_stat_t stat_buf;
if (HDstat("/dev/urandom", &stat_buf) == 0) {
uLongf len = src_len;
@@ -385,7 +387,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long
Bytef *src;
for (src_len = min_buf_size; src_len <= max_buf_size; src_len <<= 1) {
- register unsigned long i, iters;
+ unsigned long i, iters;
iters = file_size / src_len;
src = (Bytef *)HDcalloc(1, sizeof(Bytef) * src_len);