summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/error.h41
-rw-r--r--src/include/extern.h5
-rw-r--r--src/include/wiredtiger.in15
3 files changed, 27 insertions, 34 deletions
diff --git a/src/include/error.h b/src/include/error.h
index efc1617fcd3..fcb96b16361 100644
--- a/src/include/error.h
+++ b/src/include/error.h
@@ -28,28 +28,17 @@
__wt_err(session, ret, __VA_ARGS__); \
goto err; \
} while (0)
-#define WT_ERR_BUSY_OK(a) do { \
- if ((ret = (a)) != 0) { \
- if (ret == EBUSY) \
- ret = 0; \
- else \
- goto err; \
- } \
-} while (0)
-#define WT_ERR_NOTFOUND_OK(a) do { \
- if ((ret = (a)) != 0) { \
- if (ret == WT_NOTFOUND) \
- ret = 0; \
- else \
- goto err; \
- } \
-} while (0)
#define WT_ERR_TEST(a, v) do { \
if (a) { \
ret = (v); \
goto err; \
- } \
+ } else \
+ ret = 0; \
} while (0)
+#define WT_ERR_BUSY_OK(a) \
+ WT_ERR_TEST((ret = (a)) != 0 && ret != EBUSY, ret)
+#define WT_ERR_NOTFOUND_OK(a) \
+ WT_ERR_TEST((ret = (a)) != 0 && ret != WT_NOTFOUND, ret)
/* Return tests. */
#define WT_RET(a) do { \
@@ -57,24 +46,22 @@
if ((__ret = (a)) != 0) \
return (__ret); \
} while (0)
-#define WT_RET_TEST(a, v) do { \
- if (a) \
- return (v); \
-} while (0)
#define WT_RET_MSG(session, v, ...) do { \
int __ret = (v); \
__wt_err(session, __ret, __VA_ARGS__); \
return (__ret); \
} while (0)
+#define WT_RET_TEST(a, v) do { \
+ if (a) \
+ return (v); \
+} while (0)
#define WT_RET_BUSY_OK(a) do { \
- int __ret; \
- if ((__ret = (a)) != 0 && __ret != EBUSY) \
- return (__ret); \
+ int __ret = (a); \
+ WT_RET_TEST(__ret != 0 && __ret != EBUSY, __ret); \
} while (0)
#define WT_RET_NOTFOUND_OK(a) do { \
- int __ret; \
- if ((__ret = (a)) != 0 && __ret != WT_NOTFOUND) \
- return (__ret); \
+ int __ret = (a); \
+ WT_RET_TEST(__ret != 0 && __ret != WT_NOTFOUND, __ret); \
} while (0)
/* Set "ret" if not already set. */
#define WT_TRET(a) do { \
diff --git a/src/include/extern.h b/src/include/extern.h
index e5da105d6fe..ff649eb62d7 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -202,10 +202,14 @@ extern int __wt_ext_config_parser_open(WT_EXTENSION_API *wt_ext, WT_SESSION *wt_
extern int __wt_ext_config_get(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session, WT_CONFIG_ARG *cfg_arg, const char *key, WT_CONFIG_ITEM *cval);
extern int __wt_config_upgrade(WT_SESSION_IMPL *session, WT_ITEM *buf);
extern const char *__wt_wiredtiger_error(int error);
+extern int __wt_collator_confchk(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *cname);
extern int __wt_collator_config(WT_SESSION_IMPL *session, const char *uri, WT_CONFIG_ITEM *cname, WT_CONFIG_ITEM *metadata, WT_COLLATOR **collatorp, int *ownp);
extern int __wt_conn_remove_collator(WT_SESSION_IMPL *session);
+extern int __wt_compressor_confchk(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *cval);
+extern int __wt_compressor_config( WT_SESSION_IMPL *session, WT_CONFIG_ITEM *cval, WT_COMPRESSOR **compressorp);
extern int __wt_conn_remove_compressor(WT_SESSION_IMPL *session);
extern int __wt_conn_remove_data_source(WT_SESSION_IMPL *session);
+extern int __wt_extractor_confchk(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *cname);
extern int __wt_extractor_config(WT_SESSION_IMPL *session, const char *config, WT_EXTRACTOR **extractorp, int *ownp);
extern int __wt_conn_remove_extractor(WT_SESSION_IMPL *session);
extern int __wt_verbose_config(WT_SESSION_IMPL *session, const char *cfg[]);
@@ -496,6 +500,7 @@ extern int __wt_ext_struct_pack(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session
extern int __wt_ext_struct_size(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session, size_t *sizep, const char *fmt, ...);
extern int __wt_ext_struct_unpack(WT_EXTENSION_API *wt_api, WT_SESSION *wt_session, const void *buffer, size_t size, const char *fmt, ...);
extern int __wt_struct_check(WT_SESSION_IMPL *session, const char *fmt, size_t len, int *fixedp, uint32_t *fixed_lenp);
+extern int __wt_struct_confchk(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *v);
extern int __wt_struct_size(WT_SESSION_IMPL *session, size_t *sizep, const char *fmt, ...);
extern int __wt_struct_pack(WT_SESSION_IMPL *session, void *buffer, size_t size, const char *fmt, ...);
extern int __wt_struct_unpack(WT_SESSION_IMPL *session, const void *buffer, size_t size, const char *fmt, ...);
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 97c9459c424..608fc019131 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -993,9 +993,9 @@ struct __wt_session {
* @config{block_compressor, configure a compressor for file blocks.
* Permitted values are \c "none" or custom compression engine name
* created with WT_CONNECTION::add_compressor. If WiredTiger has
- * builtin support for \c "snappy"\, \c "lz4" or \c "zlib" compression\,
- * these names are also available. See @ref compression for more
- * information., a string; default \c none.}
+ * builtin support for \c "bzip2"\, \c "snappy"\, \c "lz4" or \c "zlib"
+ * compression\, these names are also available. See @ref compression
+ * for more information., a string; default \c none.}
* @config{cache_resident, do not ever evict the object's pages; see
* @ref tuning_cache_resident for more information., a boolean flag;
* default \c false.}
@@ -1994,10 +1994,11 @@ struct __wt_connection {
* @config{    archive, automatically
* archive unneeded log files., a boolean flag; default \c true.}
* @config{    compressor, configure a compressor for log
- * records. Permitted values are \c "none" or \c "bzip2"\, \c "snappy"\, \c
- * "lz4" or custom compression engine \c "name" created with
- * WT_CONNECTION::add_compressor. See @ref compression for more information., a
- * string; default \c none.}
+ * records. Permitted values are \c "none" or custom compression engine name
+ * created with WT_CONNECTION::add_compressor. If WiredTiger has builtin
+ * support for \c "bzip2"\, \c "snappy"\, \c "lz4" or \c "zlib" compression\,
+ * these names are also available. See @ref compression for more information.,
+ * a string; default \c none.}
* @config{    enabled, enable
* logging subsystem., a boolean flag; default \c false.}
* @config{    file_max, the maximum size of log files., an