diff --git a/src/H5.c b/src/H5.c index c0ebb14e93f..a59c013eac6 100644 --- a/src/H5.c +++ b/src/H5.c @@ -275,7 +275,7 @@ H5_init_library(void) /* Debugging? */ H5__debug_mask("-all"); - H5__debug_mask(HDgetenv("HDF5_DEBUG")); + H5__debug_mask(getenv("HDF5_DEBUG")); done: FUNC_LEAVE_NOAPI(ret_value) @@ -887,7 +887,7 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) const char *s; /* Environment string for disabling version check */ /* Allow different versions of the header files and library? */ - s = HDgetenv("HDF5_DISABLE_VERSION_CHECK"); + s = getenv("HDF5_DISABLE_VERSION_CHECK"); if (s && isdigit(*s)) disable_version_check = (unsigned int)strtol(s, NULL, 0); diff --git a/src/H5AC.c b/src/H5AC.c index 1ce0a96d8be..802ccddecd8 100644 --- a/src/H5AC.c +++ b/src/H5AC.c @@ -143,7 +143,7 @@ H5AC_init(void) { const char *s; /* String for environment variables */ - s = HDgetenv("H5_COLL_API_SANITY_CHECK"); + s = getenv("H5_COLL_API_SANITY_CHECK"); if (s && isdigit(*s)) { long env_val = strtol(s, NULL, 0); H5_coll_api_sanity_check_g = (0 == env_val) ? false : true; diff --git a/src/H5Dint.c b/src/H5Dint.c index 3f4ff72ccf1..b37d35cfdc5 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -191,8 +191,8 @@ H5D_init(void) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter"); /* Retrieve the prefixes of VDS and external file from the environment variable */ - H5D_prefix_vds_env = HDgetenv("HDF5_VDS_PREFIX"); - H5D_prefix_ext_env = HDgetenv("HDF5_EXTFILE_PREFIX"); + H5D_prefix_vds_env = getenv("HDF5_VDS_PREFIX"); + H5D_prefix_ext_env = getenv("HDF5_EXTFILE_PREFIX"); done: FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 94f2c395065..3bab6be8c15 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -544,7 +544,7 @@ H5D__mpio_debug_init(void) memset(H5D_mpio_debug_flags_s, 0, sizeof(H5D_mpio_debug_flags_s)); /* Retrieve and parse the H5Dmpio debug string */ - debug_str = HDgetenv("H5D_mpio_Debug"); + debug_str = getenv("H5D_mpio_Debug"); if (debug_str) H5D__mpio_parse_debug_str(debug_str); diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 5cc17feb9c7..31499206aa4 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -430,7 +430,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size) static inline const H5FD_core_fapl_t * H5FD__core_get_default_config(void) { - char *driver = HDgetenv(HDF5_DRIVER); + char *driver = getenv(HDF5_DRIVER); if (driver) { if (!strcmp(driver, "core")) @@ -462,7 +462,7 @@ H5FD_core_init(void) FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT")) ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1"))) diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index b7dd18d05bd..d370cd0b552 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -203,7 +203,7 @@ H5FD_direct_init(void) FUNC_ENTER_NOAPI(H5I_INVALID_HID) /* Check the use disabled file locks environment variable */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT")) ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1"))) diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 35374a800bc..8d43dc836a6 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -244,7 +244,7 @@ H5FD_log_init(void) FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT")) ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1"))) diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index d2377cbc394..105aa35a30c 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -280,7 +280,7 @@ H5FD_mpio_init(void) H5FD_MPIO_g = H5FD_register((const H5FD_class_t *)&H5FD_mpio_g, sizeof(H5FD_class_t), false); /* Check if MPI driver has been loaded dynamically */ - env = HDgetenv(HDF5_DRIVER); + env = getenv(HDF5_DRIVER); if (env && !strcmp(env, "mpio")) { int mpi_initialized = 0; @@ -299,7 +299,7 @@ H5FD_mpio_init(void) const char *s; /* String for environment variables */ /* Allow MPI buf-and-file-type optimizations? */ - s = HDgetenv("HDF5_MPI_OPT_TYPES"); + s = getenv("HDF5_MPI_OPT_TYPES"); if (s && isdigit(*s)) H5FD_mpi_opt_types_g = (0 == strtol(s, NULL, 0)) ? false : true; @@ -308,7 +308,7 @@ H5FD_mpio_init(void) memset(H5FD_mpio_debug_flags_s, 0, sizeof(H5FD_mpio_debug_flags_s)); /* Retrieve MPI-IO debugging environment variable */ - s = HDgetenv("H5FD_mpio_Debug"); + s = getenv("H5FD_mpio_Debug"); if (s) H5FD__mpio_parse_debug_str(s); #endif /* H5FDmpio_DEBUG */ diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c index 7c5ff1def5f..de70b020955 100644 --- a/src/H5FDs3comms.c +++ b/src/H5FDs3comms.c @@ -2074,9 +2074,9 @@ H5FD_s3comms_load_aws_profile(const char *profile_name, char *key_id_out, char * #endif #ifdef H5_HAVE_WIN32_API - ret = snprintf(awspath, 117, "%s/.aws/", HDgetenv("USERPROFILE")); + ret = snprintf(awspath, 117, "%s/.aws/", getenv("USERPROFILE")); #else - ret = snprintf(awspath, 117, "%s/.aws/", HDgetenv("HOME")); + ret = snprintf(awspath, 117, "%s/.aws/", getenv("HOME")); #endif if (ret < 0 || (size_t)ret >= 117) HGOTO_ERROR(H5E_ARGS, H5E_CANTCOPY, FAIL, "unable to format home-aws path"); diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index fa48aa3cf46..29616842c15 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -204,7 +204,7 @@ H5FD_sec2_init(void) FUNC_ENTER_NOAPI_NOERR /* Check the use disabled file locks environment variable */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && !strcmp(lock_env_var, "BEST_EFFORT")) ignore_disabled_file_locks_s = true; /* Override: Ignore disabled locks */ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "1"))) diff --git a/src/H5FDsubfiling/H5FDioc.c b/src/H5FDsubfiling/H5FDioc.c index cff80c7829d..39766de6594 100644 --- a/src/H5FDsubfiling/H5FDioc.c +++ b/src/H5FDsubfiling/H5FDioc.c @@ -225,7 +225,7 @@ H5FD_ioc_init(void) H5_SUBFILING_GOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "can't register IOC VFD"); /* Check if IOC VFD has been loaded dynamically */ - env_var = HDgetenv(HDF5_DRIVER); + env_var = getenv(HDF5_DRIVER); if (env_var && !strcmp(env_var, H5FD_IOC_NAME)) { int mpi_initialized = 0; int provided = 0; @@ -1494,7 +1494,7 @@ H5FD__ioc_del(const char *name, hid_t fapl) "can't allocate config file name buffer"); /* Check if a prefix has been set for the configuration file name */ - prefix_env = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX); + prefix_env = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX); /* TODO: No support for subfile directory prefix currently */ /* TODO: Possibly try loading config file prefix from file before deleting */ diff --git a/src/H5FDsubfiling/H5FDioc_threads.c b/src/H5FDsubfiling/H5FDioc_threads.c index 98dd00b916f..0b82b8f15a9 100644 --- a/src/H5FDsubfiling/H5FDioc_threads.c +++ b/src/H5FDsubfiling/H5FDioc_threads.c @@ -167,7 +167,7 @@ initialize_ioc_threads(void *_sf_context) H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, (-1), "can't initialize IOC thread queue mutex"); /* Allow experimentation with the number of helper threads */ - if ((env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) { + if ((env_value = getenv(H5FD_IOC_THREAD_POOL_SIZE)) != NULL) { int value_check = atoi(env_value); if (value_check > 0) { thread_pool_size = (unsigned int)value_check; diff --git a/src/H5FDsubfiling/H5FDsubfiling.c b/src/H5FDsubfiling/H5FDsubfiling.c index 058ac83f6d1..c15fd2c01fd 100644 --- a/src/H5FDsubfiling/H5FDsubfiling.c +++ b/src/H5FDsubfiling/H5FDsubfiling.c @@ -585,7 +585,7 @@ H5FD__subfiling_get_default_config(hid_t fapl_id, H5FD_subfiling_config_t *confi config_out->shared_cfg.stripe_size = H5FD_SUBFILING_DEFAULT_STRIPE_SIZE; config_out->shared_cfg.stripe_count = H5FD_SUBFILING_DEFAULT_STRIPE_COUNT; - if ((h5_require_ioc = HDgetenv("H5_REQUIRE_IOC")) != NULL) { + if ((h5_require_ioc = getenv("H5_REQUIRE_IOC")) != NULL) { int value_check = atoi(h5_require_ioc); if (value_check == 0) config_out->require_ioc = false; diff --git a/src/H5FDsubfiling/H5subfiling_common.c b/src/H5FDsubfiling/H5subfiling_common.c index 0362ab40d89..37fd5efad08 100644 --- a/src/H5FDsubfiling/H5subfiling_common.c +++ b/src/H5FDsubfiling/H5subfiling_common.c @@ -776,7 +776,7 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param new_context->sf_group_comm = MPI_COMM_NULL; /* Check if a prefix has been set for the configuration file name */ - prefix_env = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX); + prefix_env = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX); if (prefix_env) { if (NULL == (new_context->config_file_prefix = strdup(prefix_env))) H5_SUBFILING_GOTO_ERROR(H5E_VFL, H5E_CANTCOPY, FAIL, "couldn't copy config file prefix string"); @@ -851,7 +851,7 @@ init_subfiling(const char *base_filename, uint64_t file_id, H5FD_subfiling_param char *env_value = NULL; /* Check for a subfiling stripe size setting from the environment */ - if ((env_value = HDgetenv(H5FD_SUBFILING_STRIPE_SIZE))) { + if ((env_value = getenv(H5FD_SUBFILING_STRIPE_SIZE))) { long long stripe_size = -1; errno = 0; @@ -981,7 +981,7 @@ init_app_topology(int64_t sf_context_id, H5FD_subfiling_params_t *subfiling_conf case SELECT_IOC_ONE_PER_NODE: { if (comm_size > 1) { /* Check for an IOC-per-node value set in the environment */ - if ((env_value = HDgetenv(H5FD_SUBFILING_IOC_PER_NODE))) { + if ((env_value = getenv(H5FD_SUBFILING_IOC_PER_NODE))) { errno = 0; ioc_select_val = strtol(env_value, NULL, 0); if ((ERANGE == errno)) { @@ -1178,7 +1178,7 @@ static herr_t get_ioc_selection_criteria_from_env(H5FD_subfiling_ioc_select_t *ioc_selection_type, char **ioc_sel_info_str) { char *opt_value = NULL; - char *env_value = HDgetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA); + char *env_value = getenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA); herr_t ret_value = SUCCEED; assert(ioc_selection_type); @@ -1821,7 +1821,7 @@ init_subfiling_context(subfiling_context_t *sf_context, const char *base_filenam "couldn't allocate space for subfiling filename"); /* Check for a subfile name prefix setting in the environment */ - if ((env_value = HDgetenv(H5FD_SUBFILING_SUBFILE_PREFIX))) { + if ((env_value = getenv(H5FD_SUBFILING_SUBFILE_PREFIX))) { if (NULL == (sf_context->subfile_prefix = strdup(env_value))) H5_SUBFILING_GOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "couldn't copy subfile prefix value"); } diff --git a/src/H5Fint.c b/src/H5Fint.c index 2aadccabe46..014f619d8a9 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -244,7 +244,7 @@ H5F__parse_file_lock_env_var(htri_t *use_locks) FUNC_ENTER_PACKAGE_NOERR /* Check the file locking environment variable */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && (!strcmp(lock_env_var, "FALSE") || !strcmp(lock_env_var, "0"))) *use_locks = false; /* Override: Never use locks */ else if (lock_env_var && (!strcmp(lock_env_var, "TRUE") || !strcmp(lock_env_var, "BEST_EFFORT") || @@ -875,9 +875,9 @@ H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix_type, const c /* Get the appropriate environment variable */ if (H5F_PREFIX_VDS == prefix_type) - env_prefix = HDgetenv("HDF5_VDS_PREFIX"); + env_prefix = getenv("HDF5_VDS_PREFIX"); else if (H5F_PREFIX_ELINK == prefix_type) - env_prefix = HDgetenv("HDF5_EXT_PREFIX"); + env_prefix = getenv("HDF5_EXT_PREFIX"); else HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, NULL, "prefix type is not sensible"); diff --git a/src/H5PLint.c b/src/H5PLint.c index 23eec72ddf3..23d07506d3e 100644 --- a/src/H5PLint.c +++ b/src/H5PLint.c @@ -140,7 +140,7 @@ H5PL_init(void) * to ignore plugins. The special symbol H5PL_NO_PLUGIN (defined in * H5PLpublic.h) means we don't want to load plugins. */ - if (NULL != (env_var = HDgetenv(HDF5_PLUGIN_PRELOAD))) + if (NULL != (env_var = getenv(HDF5_PLUGIN_PRELOAD))) if (!strcmp(env_var, H5PL_NO_PLUGIN)) { H5PL_plugin_control_mask_g = 0; H5PL_allow_plugins_g = false; diff --git a/src/H5PLpath.c b/src/H5PLpath.c index fafce6220a7..4dd4b17afe7 100644 --- a/src/H5PLpath.c +++ b/src/H5PLpath.c @@ -248,7 +248,7 @@ H5PL__create_path_table(void) /* Retrieve paths from HDF5_PLUGIN_PATH if the user sets it * or from the default paths if it isn't set. */ - env_var = HDgetenv(HDF5_PLUGIN_PATH); + env_var = getenv(HDF5_PLUGIN_PATH); if (NULL == env_var) paths = H5MM_strdup(H5PL_DEFAULT_PATH); else diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 83381096080..bf448a6bc4a 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -851,7 +851,7 @@ H5P__facc_set_def_driver(void) FUNC_ENTER_PACKAGE /* Check if VFL driver environment variable is set */ - driver_env_var = HDgetenv(HDF5_DRIVER); + driver_env_var = getenv(HDF5_DRIVER); /* Only parse VFL driver string if it's set */ if (driver_env_var && *driver_env_var) { @@ -889,7 +889,7 @@ H5P__facc_set_def_driver(void) } /* end else */ /* Retrieve driver configuration string from environment variable, if set. */ - driver_config_env_var = HDgetenv(HDF5_DRIVER_CONFIG); + driver_config_env_var = getenv(HDF5_DRIVER_CONFIG); driver_prop.driver_id = driver_id; driver_prop.driver_info = NULL; diff --git a/src/H5VLint.c b/src/H5VLint.c index 0b18a7c8371..feb2debd947 100644 --- a/src/H5VLint.c +++ b/src/H5VLint.c @@ -370,7 +370,7 @@ H5VL__set_def_conn(void) } /* end if */ /* Check for environment variable set */ - env_var = HDgetenv(HDF5_VOL_CONNECTOR); + env_var = getenv(HDF5_VOL_CONNECTOR); /* Only parse the string if it's set */ if (env_var && *env_var) { diff --git a/src/H5mpi.c b/src/H5mpi.c index 2cd335df564..005a99aa6ae 100644 --- a/src/H5mpi.c +++ b/src/H5mpi.c @@ -819,7 +819,7 @@ H5_mpio_get_file_sync_required(MPI_File fh, bool *file_sync_required) HGOTO_ERROR(H5E_LIB, H5E_CANTFREE, FAIL, "can't free MPI info"); /* Force setting the flag via env variable (temp solution before the flag is implemented in MPI) */ - sync_env_var = HDgetenv("HDF5_DO_MPI_FILE_SYNC"); + sync_env_var = getenv("HDF5_DO_MPI_FILE_SYNC"); if (sync_env_var && (!strcmp(sync_env_var, "TRUE") || !strcmp(sync_env_var, "1"))) *file_sync_required = true; if (sync_env_var && (!strcmp(sync_env_var, "FALSE") || !strcmp(sync_env_var, "0"))) diff --git a/src/H5private.h b/src/H5private.h index b3e3dc84d44..a77624aea69 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -694,9 +694,6 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation); #define HDgetdrive() 0 #endif -#ifndef HDgetenv -#define HDgetenv(S) getenv(S) -#endif #ifndef HDgetpid #define HDgetpid() getpid() #endif diff --git a/test/API/H5_api_test.c b/test/API/H5_api_test.c index 98dd260c081..654eb4024ac 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 c2b4260eb9d..ca5d0e41eac 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 d404a825f24..a3b2f6cd2fa 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 69b9bbf1081..e8abe16779b 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 befa360c6c1..17da4c6f726 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"; diff --git a/test/accum.c b/test/accum.c index e3e79de00a2..5a19efeebf5 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2077,7 +2077,7 @@ test_swmr_write_big(bool newest_format) /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); if (!H5FD__supports_swmr_test(driver)) { SKIPPED(); puts(" Test skipped due to VFD not supporting SWMR I/O."); diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c index a6065063610..5b3ecd8a7fc 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -56,7 +56,7 @@ main(void) /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); if (!H5FD__supports_swmr_test(driver)) return EXIT_SUCCESS; diff --git a/test/app_ref.c b/test/app_ref.c index 5e52fe7ddda..729862ee39f 100644 --- a/test/app_ref.c +++ b/test/app_ref.c @@ -94,7 +94,7 @@ main(void) TESTING("library shutdown with reference count > 1"); /* 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/btree2.c b/test/btree2.c index 8970d894ccd..3ad30ac9f1a 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -9918,7 +9918,7 @@ main(void) const char *envval = NULL; bool api_ctx_pushed = false; /* Whether API context pushed */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; diff --git a/test/cache_image.c b/test/cache_image.c index 4768916e8ea..60e23984366 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -7758,7 +7758,7 @@ main(void) int express_test; /* 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/cork.c b/test/cork.c index 98abdec7137..e0a7196b601 100644 --- a/test/cork.c +++ b/test/cork.c @@ -2234,7 +2234,7 @@ main(void) /* Skip these tests if SWMR I/O is not supported for the VFD specified * by the environment variable. */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); if (!H5FD__supports_swmr_test(driver)) { puts("-- SKIPPED SWMR tests for SWMR-incompatible VFD --"); continue; diff --git a/test/dangle.c b/test/dangle.c index 490bb2f2a9d..4079fce6f51 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -627,7 +627,7 @@ main(void) int nerrors = 0; /* 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/dsets.c b/test/dsets.c index ecf6db0f9ab..5b427840152 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -15427,7 +15427,7 @@ main(void) int i; /* Don't run this test using certain file drivers */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; diff --git a/test/error_test.c b/test/error_test.c index 9fe81176f28..57b1eb7a6b3 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -786,7 +786,7 @@ main(void) int i; /* 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/fheap.c b/test/fheap.c index 337e3877bbf..19a1e6adc16 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -15963,7 +15963,7 @@ main(void) bool api_ctx_pushed = false; /* Whether API context pushed */ /* Don't run this test using certain file drivers */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; diff --git a/test/filenotclosed.c b/test/filenotclosed.c index a838a89fd87..806a7a498d9 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -63,7 +63,7 @@ main(void) bool contig_addr_vfd; /* Contiguous address vfd */ /* 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/flush1.c b/test/flush1.c index 4adddabec57..566d5614c9c 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -188,7 +188,7 @@ main(void) TEST_ERROR; /* Check if the current VFD supports SWMR */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); vfd_supports_swmr = H5FD__supports_swmr_test(driver); /*************************************************/ diff --git a/test/flush2.c b/test/flush2.c index c807612ecdc..ccec232e3d7 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -236,7 +236,7 @@ main(void) PUTS_ERROR("bad vfd-dependent fapl"); /* Check if the current VFD supports SWMR */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); vfd_supports_swmr = H5FD__supports_swmr_test(driver); if (h5_driver_is_default_vfd_compatible(fapl_id, &driver_is_default_vfd_compatible) < 0) { diff --git a/test/flushrefresh.c b/test/flushrefresh.c index ce94026066b..297db60e7ac 100644 --- a/test/flushrefresh.c +++ b/test/flushrefresh.c @@ -146,7 +146,7 @@ main(int argc, char *argv[]) * anything. */ /* Determine driver being used */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL || H5FD__supports_swmr_test(envval)) { if (test_flush() != SUCCEED) diff --git a/test/h5test.c b/test/h5test.c index 21585f7b4e7..e7e9ec96429 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -467,7 +467,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; @@ -526,7 +526,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(); } @@ -574,7 +574,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) @@ -596,8 +596,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) { @@ -787,7 +787,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) @@ -925,7 +925,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); @@ -1088,7 +1088,7 @@ h5_get_file_size(const char *filename, hid_t fapl) h5_stat_size_t tot_size = 0; char *driver_env_var = NULL; - driver_env_var = HDgetenv(HDF5_DRIVER); + driver_env_var = getenv(HDF5_DRIVER); if (driver_env_var && !strcmp(driver_env_var, "split")) { for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { if (mt != H5FD_MEM_DRAW && mt != H5FD_MEM_SUPER) @@ -1302,7 +1302,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); @@ -1339,7 +1339,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; @@ -1917,7 +1917,7 @@ H5_get_srcdir_filename(const char *filename) const char * H5_get_srcdir(void) { - const char *srcdir = HDgetenv("srcdir"); + const char *srcdir = getenv("srcdir"); /* Check for using the srcdir from configure time */ if (NULL == srcdir) @@ -2076,7 +2076,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")); @@ -2197,7 +2197,7 @@ h5_driver_uses_multiple_files(const char *drv_name, unsigned flags) bool ret_val = false; if (!drv_name) - drv_name = HDgetenv(HDF5_DRIVER); + drv_name = getenv(HDF5_DRIVER); if (drv_name) { if ((flags & H5_EXCLUDE_MULTIPART_DRIVERS) == 0) { diff --git a/test/hdfs.c b/test/hdfs.c index fe876fa5c31..857a54c9c12 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -1579,7 +1579,7 @@ main(void) static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = ""; const char *hdfs_namenode_name_env = NULL; - hdfs_namenode_name_env = HDgetenv("HDFS_TEST_NAMENODE_NAME"); + hdfs_namenode_name_env = getenv("HDFS_TEST_NAMENODE_NAME"); if (hdfs_namenode_name_env == NULL || hdfs_namenode_name_env[0] == '\0') { strncpy(hdfs_namenode_name, "localhost", HDFS_NAMENODE_NAME_MAX_SIZE); } diff --git a/test/links.c b/test/links.c index d7074301893..6f07d32253e 100644 --- a/test/links.c +++ b/test/links.c @@ -22656,7 +22656,7 @@ main(void) const char *env_h5_drvr; /* File Driver value from environment */ bool driver_is_default_compatible; - 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/links_env.c b/test/links_env.c index 3c67623a14c..1eae52a5128 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -61,7 +61,7 @@ external_link_env(hid_t fapl, bool new_format) else TESTING("external links via environment variable"); - if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL) + if ((envval = getenv("HDF5_EXT_PREFIX")) == NULL) envval = "nomatch"; if (strcmp(envval, ".:tmp_links_env") != 0) TEST_ERROR; @@ -149,7 +149,7 @@ main(void) int nerrors = 0; /* Error from tests */ /* 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/mf.c b/test/mf.c index 6399caf24c7..d58cbfda067 100644 --- a/test/mf.c +++ b/test/mf.c @@ -9134,7 +9134,7 @@ main(void) bool api_ctx_pushed = false; /* Whether API context pushed */ /* 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/objcopy.c b/test/objcopy.c index 2afff4be94c..d604c540b83 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -17128,7 +17128,7 @@ main(void) bool same_file; /* Whether to run tests that only use one file */ bool driver_is_default_compatible; - 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/ohdr.c b/test/ohdr.c index 7d8eb75941a..99b979b0777 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -1839,7 +1839,7 @@ main(void) herr_t ret; /* Generic return value */ /* 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/onion.c b/test/onion.c index bbbcaf54fac..a2bdda3723b 100644 --- a/test/onion.c +++ b/test/onion.c @@ -4918,7 +4918,7 @@ main(void) /* The onion VFD only supports the sec2 VFD under the hood, so skip this * test when the environment variable has been set to something else */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr == NULL) env_h5_drvr = "nomatch"; if ((0 != strcmp(env_h5_drvr, "nomatch")) && (0 != strcmp(env_h5_drvr, "sec2"))) { diff --git a/test/page_buffer.c b/test/page_buffer.c index 65f2038cbbd..651e84a348c 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -2072,7 +2072,7 @@ main(void) h5_reset(); /* 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/reserved.c b/test/reserved.c index ff37baf034f..5540d044b62 100644 --- a/test/reserved.c +++ b/test/reserved.c @@ -466,7 +466,7 @@ main(void) hid_t fapl; const char *envval = NULL; - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; /* QAK: should be able to use the core driver? */ diff --git a/test/ros3.c b/test/ros3.c index 5ab2dec5c0f..cc058fbc9b0 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -1695,7 +1695,7 @@ main(void) * initialize test urls * ************************/ - bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL"); + bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL"); if (bucket_url_env == NULL || bucket_url_env[0] == '\0') { printf("WARNING: S3 bucket url is not defined in environment " "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n"); diff --git a/test/s3comms.c b/test/s3comms.c index b9b28020b39..40f163e8ef2 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -2520,7 +2520,7 @@ main(void) s3_test_credentials_loaded = 1; } - bucket_url_env = HDgetenv("HDF5_ROS3_TEST_BUCKET_URL"); + bucket_url_env = getenv("HDF5_ROS3_TEST_BUCKET_URL"); if (bucket_url_env == NULL || bucket_url_env[0] == '\0') { printf("WARNING: S3 bucket url is not defined in environment " "variable 'HDF5_ROS3_TEST_BUCKET_URL'!\n"); diff --git a/test/select_io_dset.c b/test/select_io_dset.c index 4c671909a8b..d75b76becdb 100644 --- a/test/select_io_dset.c +++ b/test/select_io_dset.c @@ -2859,7 +2859,7 @@ test_no_selection_io_cause_mode(const char *filename, hid_t fapl, uint32_t test_ /* The split and multi driver are not compatible with page buffering. No message since the other * cases aren't skipped. */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr && (!strcmp(env_h5_drvr, "split") || !strcmp(env_h5_drvr, "multi"))) return 0; } diff --git a/test/set_extent.c b/test/set_extent.c index 08b96a5837f..d418f2edc71 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -113,7 +113,7 @@ main(void) const char *env_h5_drvr; /* File Driver value from environment */ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr == NULL) env_h5_drvr = "nomatch"; /* Current VFD that does not support contiguous address space */ diff --git a/test/stab.c b/test/stab.c index e43e9c0b262..1b7da018822 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1381,7 +1381,7 @@ main(void) int nerrors = 0; /* 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/swmr.c b/test/swmr.c index e7eec671d23..68bf024d418 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -7742,7 +7742,7 @@ main(void) /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. */ - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); if (!H5FD__supports_swmr_test(driver)) { printf("This VFD does not support SWMR I/O\n"); return EXIT_SUCCESS; @@ -7752,7 +7752,7 @@ main(void) * about file locking. File locking should be used unless explicitly * disabled. */ - lock_env_var = HDgetenv(HDF5_USE_FILE_LOCKING); + lock_env_var = getenv(HDF5_USE_FILE_LOCKING); if (lock_env_var && !strcmp(lock_env_var, "FALSE")) use_file_locking = false; else diff --git a/test/testframe.c b/test/testframe.c index 13cdf0eb3ec..99d3489e6fd 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -445,7 +445,7 @@ GetTestExpress(void) #endif /* Check if HDF5TestExpress is set to override the default level */ - env_val = HDgetenv("HDF5TestExpress"); + env_val = getenv("HDF5TestExpress"); if (env_val) { if (strcmp(env_val, "0") == 0) express_val = 0; @@ -633,7 +633,7 @@ void TestAlarmOn(void) { #ifdef H5_HAVE_ALARM - char *env_val = HDgetenv("HDF5_ALARM_SECONDS"); /* Alarm environment */ + char *env_val = getenv("HDF5_ALARM_SECONDS"); /* Alarm environment */ unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */ /* Get the alarm value from the environment variable, if set */ diff --git a/test/testhdf5.c b/test/testhdf5.c index 82bc2b6ccec..93da1d8ded5 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -80,7 +80,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP)) + if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP)) TestCleanup(); /* Release test infrastructure */ diff --git a/test/tfile.c b/test/tfile.c index e5183bb05ae..3e1fa852246 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -8123,7 +8123,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/trefer.c b/test/trefer.c index d69e4b13daf..f17e114fd67 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -3564,7 +3564,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/tselect.c b/test/tselect.c index c8450ccd1db..f3d08efdf93 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -16057,7 +16057,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"; diff --git a/test/tsohm.c b/test/tsohm.c index e507fb94b2e..b3f48d323d1 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -3716,7 +3716,7 @@ test_sohm(void) MESSAGE(5, ("Testing Shared Object Header Messages\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/ttsafe.c b/test/ttsafe.c index ce53cce2ef9..6fe14fcc390 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -131,7 +131,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !HDgetenv(HDF5_NOCLEANUP)) + if (GetTestCleanup() && !getenv(HDF5_NOCLEANUP)) TestCleanup(); /* Release test infrastructure */ diff --git a/test/vds.c b/test/vds.c index 167fbffda43..c2546e57f00 100644 --- a/test/vds.c +++ b/test/vds.c @@ -12320,7 +12320,7 @@ main(void) bool driver_is_parallel; int nerrors = 0; - 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/vds_env.c b/test/vds_env.c index bf306977ef9..e9649566fd9 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -331,7 +331,7 @@ main(void) bool driver_is_parallel; int nerrors = 0; - 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/vfd.c b/test/vfd.c index ca748c0f7b7..5a86920652e 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -5880,7 +5880,7 @@ main(void) * specific VFD to be set and HDF5_DRIVER being set can interfere * with that. */ - env_h5_drvr = HDgetenv(HDF5_DRIVER); + env_h5_drvr = getenv(HDF5_DRIVER); if (env_h5_drvr) { printf(" -- SKIPPED VFD tests because %s is set -- \n", HDF5_DRIVER); exit(EXIT_SUCCESS); diff --git a/test/vol.c b/test/vol.c index b8c1e03444f..43336c6c978 100644 --- a/test/vol.c +++ b/test/vol.c @@ -2093,7 +2093,7 @@ test_async_vol_props(void) FAIL_STACK_ERROR; /* Override possible environment variable & re-initialize default VOL connector */ - conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR); + conn_env_str = getenv(HDF5_VOL_CONNECTOR); if (conn_env_str) { if (NULL == (conn_env_str = strdup(conn_env_str))) TEST_ERROR; @@ -2256,7 +2256,7 @@ test_vol_cap_flags(void) TEST_ERROR; /* If using the native VOL by default, check flags again with H5P_DEFAULT */ - vol_env = HDgetenv(HDF5_VOL_CONNECTOR); + vol_env = getenv(HDF5_VOL_CONNECTOR); if (!vol_env || (0 == strcmp(vol_env, "native"))) { H5VL_class_t *cls; hid_t connector_id; @@ -2338,8 +2338,8 @@ test_get_vol_name(void) TESTING("getting connector name"); - conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR); - if (NULL == (conn_env_str = HDgetenv("HDF5_VOL_CONNECTOR"))) + conn_env_str = getenv(HDF5_VOL_CONNECTOR); + if (NULL == (conn_env_str = getenv("HDF5_VOL_CONNECTOR"))) conn_env_str = "native"; /* Skip the connectors other than the native and pass_through connector */ @@ -2629,7 +2629,7 @@ main(void) int nerrors = 0; /* 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/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c index 92fe7228b2b..224c1b8a7c4 100644 --- a/testpar/API/H5_api_test_parallel.c +++ b/testpar/API/H5_api_test_parallel.c @@ -236,13 +236,13 @@ main(int argc, char **argv) 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_parallel_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, PARALLEL_TEST_FILE_NAME); - if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) { + if (NULL == (vol_connector_string = getenv(HDF5_VOL_CONNECTOR))) { if (MAINPROCESS) printf("No VOL connector selected; using native VOL connector\n"); vol_connector_name = "native"; diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index a0771a8bf68..a61e6749a53 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -121,7 +121,7 @@ main(int argc, char *argv[]) TESTING("H5Fflush (part1)"); /* Don't run using the split VFD */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index ea544f956db..95ad1257801 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -146,7 +146,7 @@ main(int argc, char *argv[]) TESTING("H5Fflush (part2 with flush)"); /* Don't run using the split VFD */ - envval = HDgetenv(HDF5_DRIVER); + envval = getenv(HDF5_DRIVER); if (envval == NULL) envval = "nomatch"; diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index 7d0665d45bd..bdabdf6463e 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -2072,13 +2072,13 @@ parse_subfiling_env_vars(void) { char *env_value; - if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_STRIPE_SIZE))) { + if (NULL != (env_value = getenv(H5FD_SUBFILING_STRIPE_SIZE))) { stripe_size_g = strtoll(env_value, NULL, 0); if ((ERANGE == errno) || (stripe_size_g <= 0)) stripe_size_g = -1; } - if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_IOC_PER_NODE))) { + if (NULL != (env_value = getenv(H5FD_SUBFILING_IOC_PER_NODE))) { ioc_per_node_g = strtol(env_value, NULL, 0); if ((ERANGE == errno) || (ioc_per_node_g <= 0)) ioc_per_node_g = -1; @@ -2092,13 +2092,13 @@ parse_subfiling_env_vars(void) ioc_per_node_g = node_local_size; } - if (NULL != (env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE))) { + if (NULL != (env_value = getenv(H5FD_IOC_THREAD_POOL_SIZE))) { ioc_thread_pool_size_g = atoi(env_value); if (ioc_thread_pool_size_g <= 0) ioc_thread_pool_size_g = -1; } - if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) { + if (NULL != (env_value = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) { assert(config_dir); strncpy(config_dir, env_value, PATH_MAX); @@ -2347,7 +2347,7 @@ main(int argc, char **argv) must_unset_ioc_thread_count_env = true; } - if (!(env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) { + if (!(env_value = getenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) { int rand_value = 0; if (MAINPROCESS) diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 5820610d411..dfffac67385 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 ae002a31761..04c5ff3c02b 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 c2131acacbb..fc2f0c7d024 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 232ac939c8f..e72de3207f3 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 28f4eed5fe3..700416d7198 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 ca3d5c0d42f..ad536ba02e5 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 85c41a13976..063c1658795 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; diff --git a/utils/test/swmr_check_compat_vfd.c b/utils/test/swmr_check_compat_vfd.c index 765ebd9dd48..b5cfb1ba35c 100644 --- a/utils/test/swmr_check_compat_vfd.c +++ b/utils/test/swmr_check_compat_vfd.c @@ -42,7 +42,7 @@ main(void) { char *driver = NULL; - driver = HDgetenv(HDF5_DRIVER); + driver = getenv(HDF5_DRIVER); if (H5FD__supports_swmr_test(driver)) return EXIT_SUCCESS; diff --git a/utils/tools/h5dwalk/h5dwalk.c b/utils/tools/h5dwalk/h5dwalk.c index 1f440e00c73..b510f3e6d08 100644 --- a/utils/tools/h5dwalk/h5dwalk.c +++ b/utils/tools/h5dwalk/h5dwalk.c @@ -1350,7 +1350,7 @@ main(int argc, char *argv[]) sg_mpi_rank = rank; #if 0 - env_var = HDgetenv("HDF5_H5DWALK_PRINT_CMDLINE"); + env_var = getenv("HDF5_H5DWALK_PRINT_CMDLINE"); if (env_var) { int enable = atoi(env_var); if (enable) {