diff options
author | John Mainzer <mainzer@hdfgroup.org> | 2005-05-02 18:58:28 (GMT) |
---|---|---|
committer | John Mainzer <mainzer@hdfgroup.org> | 2005-05-02 18:58:28 (GMT) |
commit | cc44e6af631d3a178872f7478a0e0f891e18a4a9 (patch) | |
tree | 131923662d4f5bffe5841dcbd7c7f06fa122353c /src | |
parent | 6b5d74f777b8955b5f6f5a96667557812630eba0 (diff) | |
download | hdf5-cc44e6af631d3a178872f7478a0e0f891e18a4a9.zip hdf5-cc44e6af631d3a178872f7478a0e0f891e18a4a9.tar.gz hdf5-cc44e6af631d3a178872f7478a0e0f891e18a4a9.tar.bz2 |
[svn-r10715] Purpose:
Remove C99 types from new metadata cache related API calls
Description:
Windows (and perhaps others) don't like int32_t and int64_t. While
we have dealt with the issue internally, it is more of a problem
in API calls.
Solution:
Convert int32_t to int and int64_t to long int in the
H5AC_cache_config_t structure used by the new metadata cache
related API calls. Added explicit type casts to convert
between internal and external representations.
Platforms tested:
h5committested
Misc. update:
Diffstat (limited to 'src')
-rw-r--r-- | src/H5AC.c | 17 | ||||
-rw-r--r-- | src/H5ACprivate.h | 6 | ||||
-rw-r--r-- | src/H5ACpublic.h | 6 |
3 files changed, 17 insertions, 12 deletions
@@ -1288,7 +1288,7 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr, config_ptr->min_clean_fraction = internal_config.min_clean_fraction; config_ptr->max_size = internal_config.max_size; config_ptr->min_size = internal_config.min_size; - config_ptr->epoch_length = internal_config.epoch_length; + config_ptr->epoch_length = (long)(internal_config.epoch_length); config_ptr->incr_mode = internal_config.incr_mode; config_ptr->lower_hr_threshold = internal_config.lower_hr_threshold; config_ptr->increment = internal_config.increment; @@ -1299,7 +1299,8 @@ H5AC_get_cache_auto_resize_config(H5AC_t * cache_ptr, config_ptr->decrement = internal_config.decrement; config_ptr->apply_max_decrement = internal_config.apply_max_decrement; config_ptr->max_decrement = internal_config.max_decrement; - config_ptr->epochs_before_eviction = internal_config.epochs_before_eviction; + config_ptr->epochs_before_eviction = + (int)(internal_config.epochs_before_eviction); config_ptr->apply_empty_reserve = internal_config.apply_empty_reserve; config_ptr->empty_reserve = internal_config.empty_reserve; @@ -1506,7 +1507,8 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr, internal_config.min_clean_fraction = config_ptr->min_clean_fraction; internal_config.max_size = config_ptr->max_size; internal_config.min_size = config_ptr->min_size; - internal_config.epoch_length = config_ptr->epoch_length; + internal_config.epoch_length = + (int64_t)(config_ptr->epoch_length); internal_config.incr_mode = config_ptr->incr_mode; internal_config.lower_hr_threshold = config_ptr->lower_hr_threshold; @@ -1519,7 +1521,8 @@ H5AC_set_cache_auto_resize_config(H5AC_t * cache_ptr, internal_config.decrement = config_ptr->decrement; internal_config.apply_max_decrement = config_ptr->apply_max_decrement; internal_config.max_decrement = config_ptr->max_decrement; - internal_config.epochs_before_eviction = config_ptr->epochs_before_eviction; + internal_config.epochs_before_eviction = + (int32_t)(config_ptr->epochs_before_eviction); internal_config.apply_empty_reserve = config_ptr->apply_empty_reserve; internal_config.empty_reserve = config_ptr->empty_reserve; @@ -1608,7 +1611,8 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr) internal_config.min_clean_fraction = config_ptr->min_clean_fraction; internal_config.max_size = config_ptr->max_size; internal_config.min_size = config_ptr->min_size; - internal_config.epoch_length = config_ptr->epoch_length; + internal_config.epoch_length = + (int64_t)(config_ptr->epoch_length); internal_config.incr_mode = config_ptr->incr_mode; internal_config.lower_hr_threshold = config_ptr->lower_hr_threshold; @@ -1621,7 +1625,8 @@ H5AC_validate_config(H5AC_cache_config_t * config_ptr) internal_config.decrement = config_ptr->decrement; internal_config.apply_max_decrement = config_ptr->apply_max_decrement; internal_config.max_decrement = config_ptr->max_decrement; - internal_config.epochs_before_eviction = config_ptr->epochs_before_eviction; + internal_config.epochs_before_eviction = + (int32_t)(config_ptr->epochs_before_eviction); internal_config.apply_empty_reserve = config_ptr->apply_empty_reserve; internal_config.empty_reserve = config_ptr->empty_reserve; diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 71d79ef..a3d357d 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -177,14 +177,14 @@ extern hid_t H5AC_ind_dxpl_id; #define H5AC__DEFAULT_CACHE_CONFIG \ { \ - /* int32_t version = */ H5C__CURR_AUTO_SIZE_CTL_VER, \ + /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER, \ /* hbool_t rpt_fcn_enabled = */ FALSE, \ /* hbool_t set_initial_size = */ TRUE, \ /* size_t initial_size = */ (1 * 1024 * 1024), \ /* double min_clean_fraction = */ 0.25, \ /* size_t max_size = */ (16 * 1024 * 1024), \ /* size_t min_size = */ ( 1 * 1024 * 1024), \ - /* int64_t epoch_length = */ 50000, \ + /* long int epoch_length = */ 50000, \ /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \ /* double lower_hr_threshold = */ 0.9, \ /* double increment = */ 2.0, \ @@ -195,7 +195,7 @@ extern hid_t H5AC_ind_dxpl_id; /* double decrement = */ 0.9, \ /* hbool_t apply_max_decrement = */ TRUE, \ /* size_t max_decrement = */ (1 * 1024 * 1024), \ - /* int32_t epochs_before_eviction = */ 3, \ + /* int epochs_before_eviction = */ 3, \ /* hbool_t apply_empty_reserve = */ TRUE, \ /* double empty_reserve = */ 0.1 \ } diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h index fab825b..f8f3b6d 100644 --- a/src/H5ACpublic.h +++ b/src/H5ACpublic.h @@ -233,7 +233,7 @@ extern "C" { typedef struct H5AC_cache_config_t { /* general configuration fields: */ - int32_t version; + int version; hbool_t rpt_fcn_enabled; @@ -245,7 +245,7 @@ typedef struct H5AC_cache_config_t size_t max_size; size_t min_size; - int64_t epoch_length; + long int epoch_length; /* size increase control fields: */ @@ -269,7 +269,7 @@ typedef struct H5AC_cache_config_t hbool_t apply_max_decrement; size_t max_decrement; - int32_t epochs_before_eviction; + int epochs_before_eviction; hbool_t apply_empty_reserve; double empty_reserve; |