diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-05-30 11:25:39 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-05-30 11:25:39 -0400 |
commit | 08b1ef73a45998fca8a8cdec488d5194a7645c7c (patch) | |
tree | d6b157746575903e43b8e0e918475b0529414b3e | |
parent | a67afbd3a148ad97ab6b7fad331e33cbd798a0b8 (diff) | |
download | mongo-08b1ef73a45998fca8a8cdec488d5194a7645c7c.tar.gz |
Don't use u_int in the API, it's a non-standard type. Closes #561.
-rw-r--r-- | src/btree/bt_handle.c | 10 | ||||
-rw-r--r-- | src/docs/upgrading.dox | 8 | ||||
-rw-r--r-- | src/include/btree.h | 2 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 2 |
4 files changed, 15 insertions, 7 deletions
diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c index f8f58221c18..0794aeb1395 100644 --- a/src/btree/bt_handle.c +++ b/src/btree/bt_handle.c @@ -14,7 +14,7 @@ static int __btree_preload(WT_SESSION_IMPL *); static int __btree_tree_open_empty(WT_SESSION_IMPL *, int); static int pse1(WT_SESSION_IMPL *, const char *, uint32_t, uint32_t); -static int pse2(WT_SESSION_IMPL *, const char *, uint32_t, uint32_t, uint32_t); +static int pse2(WT_SESSION_IMPL *, const char *, uint32_t, uint32_t, int); /* * __wt_btree_open -- @@ -562,7 +562,7 @@ __btree_page_sizes(WT_SESSION_IMPL *session) btree->maxleafitem = (uint32_t)cval.val; WT_RET(__wt_config_gets(session, cfg, "split_pct", &cval)); - btree->split_pct = (u_int)cval.val; + btree->split_pct = (int)cval.val; /* * When a page is forced to split, we want at least 50 entries on its @@ -674,11 +674,11 @@ pse1(WT_SESSION_IMPL *session, const char *type, uint32_t max, uint32_t ovfl) static int pse2(WT_SESSION_IMPL *session, - const char *type, uint32_t max, uint32_t ovfl, uint32_t pct) + const char *type, uint32_t max, uint32_t ovfl, int pct) { WT_RET_MSG(session, EINVAL, "%s page size (%" PRIu32 "B) too small for the maximum item size " - "(%" PRIu32 "B), because of the split percentage (%" PRIu32 - "%%); a split page must be able to hold at least 2 items", + "(%" PRIu32 "B), because of the split percentage (%d %%); a split " + "page must be able to hold at least 2 items", type, max, ovfl, pct); } diff --git a/src/docs/upgrading.dox b/src/docs/upgrading.dox index d8c069ecb43..622a3c4571a 100644 --- a/src/docs/upgrading.dox +++ b/src/docs/upgrading.dox @@ -11,6 +11,7 @@ configuration string \c internal_page_max changed from 2KB to 4KB. Applications wanting to create files with smaller allocation or internal page sizes will need to set those configuration values explicitly. </dd> + <dt>Shared cache configuration</dt> <dd> In the 1.6.1 release, an explicit shared_cache=(enable=boolean) option was @@ -19,6 +20,13 @@ use shared cache functionality will need to add the enable option to the configuration string. The default value for the option is false. </dd> +<dt>WT_COMPRESSOR::compress_raw signature</dt> +<dd> +In the 1.6.1 release, the \c split_pct argument to the +WT_COMPRESSOR::compress_raw function changed type from \c u_int to \c int, +applications may require modification to avoid compiler warnings. +</dd> + </dl> <hr> @section version_160 Upgrading to Version 1.6.0 diff --git a/src/include/btree.h b/src/include/btree.h index 8e756e518f4..3ef35562446 100644 --- a/src/include/btree.h +++ b/src/include/btree.h @@ -78,7 +78,7 @@ struct __wt_btree { int internal_key_truncate; /* Reconcile: internal key truncate */ int maximum_depth; /* Reconcile: maximum tree depth */ int prefix_compression; /* Reconcile: key prefix compression */ - u_int split_pct; /* Reconcile: split page percent */ + int split_pct; /* Reconcile: split page percent */ WT_COMPRESSOR *compressor; /* Reconcile: page compressor */ WT_RWLOCK *val_ovfl_lock; /* Reconcile: overflow value lock */ diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index cc217740bac..89e9fefe0ec 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -1994,7 +1994,7 @@ struct __wt_compressor { * @returns zero for success, non-zero to indicate an error. */ int (*compress_raw)(WT_COMPRESSOR *compressor, WT_SESSION *session, - size_t page_max, u_int split_pct, size_t extra, + size_t page_max, int split_pct, size_t extra, uint8_t *src, uint32_t *offsets, uint32_t slots, uint8_t *dst, size_t dst_len, int final, |