summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-09-26 20:11:22 (GMT)
committerGitHub <noreply@github.com>2023-09-26 20:11:22 (GMT)
commita87ca572fed15303ad36adcb6f2203f8297e8277 (patch)
tree88d481127b274229c2e3a21146015fab2c82aa0e /tools
parent58f3d6664e7a2af8d6b1813374ab02d72795a5e1 (diff)
downloadhdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.zip
hdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.tar.gz
hdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.tar.bz2
Replaces HDgetenv with getenv (#3599)
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools_utils.c2
-rw-r--r--tools/src/h5ls/h5ls.c2
-rw-r--r--tools/src/h5perf/pio_engine.c6
-rw-r--r--tools/src/h5perf/pio_perf.c4
-rw-r--r--tools/src/h5perf/sio_engine.c8
-rw-r--r--tools/src/h5perf/sio_perf.c2
-rw-r--r--tools/test/perform/zip_perf.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 5820610..dfffac6 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -994,7 +994,7 @@ h5tools_getenv_update_hyperslab_bufsize(void)
int ret_value = 1;
/* check if environment variable is set for the hyperslab buffer size */
- if (NULL != (env_str = HDgetenv("H5TOOLS_BUFSIZE"))) {
+ if (NULL != (env_str = getenv("H5TOOLS_BUFSIZE"))) {
errno = 0;
hyperslab_bufsize_mb = strtol(env_str, (char **)NULL, 10);
if (errno != 0 || hyperslab_bufsize_mb <= 0)
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index ae002a3..04c5ff3 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2529,7 +2529,7 @@ get_width(void)
/* Try to get it from the COLUMNS environment variable first since it's
* value is sometimes wrong. */
- if ((s = HDgetenv("COLUMNS")) && *s && isdigit((int)*s))
+ if ((s = getenv("COLUMNS")) && *s && isdigit((int)*s))
width = (int)strtol(s, NULL, 0);
#if defined(H5_HAVE_STRUCT_VIDEOCONFIG) && defined(H5_HAVE__GETVIDEOCONFIG)
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index c2131ac..fc2f0c7 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -402,7 +402,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PARAPREFIX");
+ prefix = getenv("HDF5_PARAPREFIX");
#ifdef HDF5_PARAPREFIX
if (!prefix)
@@ -416,8 +416,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 232ac93..e72de32 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -736,7 +736,7 @@ h5_set_info_object(void)
int ret_value = 0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
+ if ((envp = getenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
valp = envp = next = strdup(envp);
@@ -1215,7 +1215,7 @@ report_parameters(struct options *opts)
fprintf(output, "Contiguous\n");
{
- char *prefix = HDgetenv("HDF5_PARAPREFIX");
+ char *prefix = getenv("HDF5_PARAPREFIX");
fprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
}
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index 28f4eed..700416d 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -310,7 +310,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -324,8 +324,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -1259,7 +1259,7 @@ do_cleanupfile(iotype iot, char *filename)
goto done;
if (clean_file_g == -1)
- clean_file_g = (HDgetenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
+ clean_file_g = (getenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
if (clean_file_g) {
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index ca3d5c0..ad536ba 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -777,7 +777,7 @@ report_parameters(struct options *opts)
}
{
- char *prefix = HDgetenv("HDF5_PREFIX");
+ char *prefix = getenv("HDF5_PREFIX");
fprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
}
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 85c41a1..063c165 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -100,7 +100,7 @@ error(const char *fmt, ...)
static void
cleanup(void)
{
- if (!HDgetenv(HDF5_NOCLEANUP))
+ if (!getenv(HDF5_NOCLEANUP))
HDunlink(filename);
free(filename);
}
@@ -197,7 +197,7 @@ static void
get_unique_name(void)
{
const char *prefix = NULL;
- const char *env = HDgetenv("HDF5_PREFIX");
+ const char *env = getenv("HDF5_PREFIX");
if (env)
prefix = env;