diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2023-09-26 20:11:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 20:11:22 (GMT) |
commit | a87ca572fed15303ad36adcb6f2203f8297e8277 (patch) | |
tree | 88d481127b274229c2e3a21146015fab2c82aa0e /test/API | |
parent | 58f3d6664e7a2af8d6b1813374ab02d72795a5e1 (diff) | |
download | hdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.zip hdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.tar.gz hdf5-a87ca572fed15303ad36adcb6f2203f8297e8277.tar.bz2 |
Replaces HDgetenv with getenv (#3599)
Diffstat (limited to 'test/API')
-rw-r--r-- | test/API/H5_api_test.c | 4 | ||||
-rw-r--r-- | test/API/testhdf5.c | 18 | ||||
-rw-r--r-- | test/API/tfile.c | 2 | ||||
-rw-r--r-- | test/API/trefer.c | 2 | ||||
-rw-r--r-- | test/API/tselect.c | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c index 98dd260..654eb40 100644 --- a/test/API/H5_api_test.c +++ b/test/API/H5_api_test.c @@ -155,12 +155,12 @@ main(int argc, char **argv) seed = (unsigned)HDtime(NULL); srand(seed); - if (NULL == (test_path_prefix = HDgetenv(HDF5_API_TEST_PATH_PREFIX))) + if (NULL == (test_path_prefix = getenv(HDF5_API_TEST_PATH_PREFIX))) test_path_prefix = ""; snprintf(H5_api_test_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, TEST_FILE_NAME); - if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) { + if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) { printf("No VOL connector selected; using native VOL connector\n"); vol_connector_name = "native"; vol_connector_info = NULL; diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c index c2b4260..ca5d0e4 100644 --- a/test/API/testhdf5.c +++ b/test/API/testhdf5.c @@ -121,7 +121,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) /* The root task does the getenv call * and sends the result to the other tasks */ if (mpi_rank == root) { - env = HDgetenv(name); + env = getenv(name); if (env) { len = (int)strlen(env); MPI_Bcast(&len, 1, MPI_INT, root, comm); @@ -158,7 +158,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) /* use original getenv */ if (env) free(env); - env = HDgetenv(name); + env = getenv(name); } /* end if */ return env; @@ -218,7 +218,7 @@ h5_get_libver_fapl(hid_t fapl) char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */ /* Get the environment variable, if it exists */ - env = HDgetenv("HDF5_LIBVER_BOUNDS"); + env = getenv("HDF5_LIBVER_BOUNDS"); #ifdef HDF5_LIBVER_BOUNDS /* Use the environment variable, then the compile-time constant */ if (!env) @@ -280,7 +280,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu /* Determine if driver is set by environment variable. If it is, * only generate a suffix if fixing the filename for the superblock * file. */ - driver_env_var = HDgetenv(HDF5_DRIVER); + driver_env_var = getenv(HDF5_DRIVER); if (driver_env_var && (H5P_DEFAULT == fapl) && subst_for_superblock) fapl = H5P_FILE_ACCESS_DEFAULT; @@ -334,7 +334,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu #endif /* H5_HAVE_PARALLEL */ } else { - if (HDgetenv(HDF5_NOCLEANUP)) + if (getenv(HDF5_NOCLEANUP)) SetTestNoCleanup(); } #endif @@ -382,7 +382,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu * For serial: * First use the environment variable, then try the constant */ - prefix = HDgetenv("HDF5_PREFIX"); + prefix = getenv("HDF5_PREFIX"); #ifdef HDF5_PREFIX if (!prefix) @@ -404,8 +404,8 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu */ char *user, *login; - user = HDgetenv("USER"); - login = HDgetenv("LOGIN"); + user = getenv("USER"); + login = getenv("LOGIN"); subdir = (user ? user : login); if (subdir) { @@ -503,7 +503,7 @@ h5_using_default_driver(const char *drv_name) assert(H5_DEFAULT_VFD == H5FD_SEC2); if (!drv_name) - drv_name = HDgetenv(HDF5_DRIVER); + drv_name = getenv(HDF5_DRIVER); if (drv_name) return (!strcmp(drv_name, "sec2") || !strcmp(drv_name, "nomatch")); diff --git a/test/API/tfile.c b/test/API/tfile.c index d404a82..a3b2f6c 100644 --- a/test/API/tfile.c +++ b/test/API/tfile.c @@ -8260,7 +8260,7 @@ test_file(void) MESSAGE(5, ("Testing Low-Level File I/O\n")); /* Get the VFD to use */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr == NULL) env_h5_drvr = "nomatch"; diff --git a/test/API/trefer.c b/test/API/trefer.c index 69b9bbf..e8abe16 100644 --- a/test/API/trefer.c +++ b/test/API/trefer.c @@ -3571,7 +3571,7 @@ test_reference(void) MESSAGE(5, ("Testing References\n")); /* Get the VFD to use */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr == NULL) env_h5_drvr = "nomatch"; diff --git a/test/API/tselect.c b/test/API/tselect.c index befa360..17da4c6 100644 --- a/test/API/tselect.c +++ b/test/API/tselect.c @@ -16093,7 +16093,7 @@ test_select(void) MESSAGE(5, ("Testing Selections\n")); /* Get the VFD to use */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr == NULL) env_h5_drvr = "nomatch"; |