summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2005-05-02 21:36:43 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2005-05-02 21:36:43 (GMT)
commit724cbc561527005e2cd4cb7026e2a144dfbef5e8 (patch)
tree89f0fe22b3689bc96926f70ca4fa84fdf193ef20
parentf6fd474fe418db0c27c474a002c414004770f098 (diff)
downloadhdf5-724cbc561527005e2cd4cb7026e2a144dfbef5e8.zip
hdf5-724cbc561527005e2cd4cb7026e2a144dfbef5e8.tar.gz
hdf5-724cbc561527005e2cd4cb7026e2a144dfbef5e8.tar.bz2
[svn-r10717] Purpose:
Remove C99 types from new metadata cache related API calls (take 2 -- missed one in the previous check in) 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 new metadata cache related API calls. Platforms tested: heping Misc. update:
-rw-r--r--src/H5F.c10
-rw-r--r--src/H5Fpublic.h2
-rw-r--r--test/cache.c8
3 files changed, 12 insertions, 8 deletions
diff --git a/src/H5F.c b/src/H5F.c
index f12aac8..8ad29cb 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -4963,11 +4963,12 @@ H5Fget_mdc_size(hid_t file_id,
size_t *max_size_ptr,
size_t *min_clean_size_ptr,
size_t *cur_size_ptr,
- int32_t *cur_num_entries_ptr)
+ int *cur_num_entries_ptr)
{
H5F_t *file=NULL; /* File object for file ID */
herr_t ret_value = SUCCEED; /* Return value */
herr_t result;
+ int32_t cur_num_entries;
FUNC_ENTER_API(H5Fget_mdc_size, FAIL)
H5TRACE5("e","i*z*z*z*Is",file_id,max_size_ptr,min_clean_size_ptr,
@@ -4984,14 +4985,17 @@ H5Fget_mdc_size(hid_t file_id,
max_size_ptr,
min_clean_size_ptr,
cur_size_ptr,
- cur_num_entries_ptr);
+ &cur_num_entries);
if ( result != SUCCEED ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
"H5AC_get_cache_size() failed.");
+
+ } else if ( cur_num_entries_ptr != NULL ) {
+
+ *cur_num_entries_ptr = (int)cur_num_entries;
}
-
done:
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index a0e3780..79a2769 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -125,7 +125,7 @@ H5_DLL herr_t H5Fget_mdc_size(hid_t file_id,
size_t * max_size_ptr,
size_t * min_clean_size_ptr,
size_t * cur_size_ptr,
- int32_t * cur_num_entries_ptr);
+ int * cur_num_entries_ptr);
H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id);
H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
diff --git a/test/cache.c b/test/cache.c
index 85d08cd..c6f4795 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -18139,7 +18139,7 @@ check_file_mdc_api_calls(void)
size_t max_size;
size_t min_clean_size;
size_t cur_size;
- int32_t cur_num_entries;
+ int cur_num_entries;
double hit_rate;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t mod_config_1 =
@@ -18591,7 +18591,7 @@ check_and_validate_cache_size(hid_t file_id,
size_t expected_cur_size;
size_t cur_size;
int32_t expected_cur_num_entries;
- int32_t cur_num_entries;
+ int cur_num_entries;
H5F_t * file_ptr = NULL;
H5C_t * cache_ptr = NULL;
@@ -18644,7 +18644,7 @@ check_and_validate_cache_size(hid_t file_id,
} else if ( ( max_size != expected_max_size ) ||
( min_clean_size != expected_min_clean_size ) ||
( cur_size != expected_cur_size ) ||
- ( cur_num_entries != expected_cur_num_entries ) ) {
+ ( cur_num_entries != (int)expected_cur_num_entries ) ) {
pass = FALSE;
failure_mssg = "H5Fget_mdc_size() returned unexpected value(s).";
@@ -20220,7 +20220,7 @@ check_file_mdc_api_errs(void)
size_t max_size;
size_t min_clean_size;
size_t cur_size;
- int32_t cur_num_entries;
+ int cur_num_entries;
double hit_rate;
H5AC_cache_config_t default_config = H5AC__DEFAULT_CACHE_CONFIG;
H5AC_cache_config_t scratch;