diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 4 | ||||
-rw-r--r-- | src/H5AC.c | 2 | ||||
-rw-r--r-- | src/H5Dint.c | 4 | ||||
-rw-r--r-- | src/H5Dmpio.c | 2 | ||||
-rw-r--r-- | src/H5FDcore.c | 4 | ||||
-rw-r--r-- | src/H5FDdirect.c | 2 | ||||
-rw-r--r-- | src/H5FDlog.c | 2 | ||||
-rw-r--r-- | src/H5FDmpio.c | 6 | ||||
-rw-r--r-- | src/H5FDs3comms.c | 4 | ||||
-rw-r--r-- | src/H5FDsec2.c | 2 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDioc.c | 4 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDioc_threads.c | 2 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5FDsubfiling.c | 2 | ||||
-rw-r--r-- | src/H5FDsubfiling/H5subfiling_common.c | 10 | ||||
-rw-r--r-- | src/H5Fint.c | 6 | ||||
-rw-r--r-- | src/H5PLint.c | 2 | ||||
-rw-r--r-- | src/H5PLpath.c | 2 | ||||
-rw-r--r-- | src/H5Pfapl.c | 4 | ||||
-rw-r--r-- | src/H5VLint.c | 2 | ||||
-rw-r--r-- | src/H5mpi.c | 2 | ||||
-rw-r--r-- | src/H5private.h | 3 |
21 files changed, 34 insertions, 37 deletions
@@ -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); @@ -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 3f4ff72..b37d35c 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 94f2c39..3bab6be 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 0f30514..08b714d 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -430,7 +430,7 @@ done: 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 b7dd18d..d370cd0 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 35374a8..8d43dc8 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 9149d2b..807af9f 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 9d6d30a..2255ec0 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 fa48aa3..2961684 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 cff80c7..39766de 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 98dd00b..0b82b8f 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 058ac83..c15fd2c 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 0362ab4..37fd5ef 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 2aadcca..014f619 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 23eec72..23d0750 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 fafce62..4dd4b17 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 8338109..bf448a6 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 0b18a7c..feb2deb 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 2cd335d..005a99a 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 b3e3dc8..a77624a 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 |