summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@wiredtiger.com>2011-08-16 07:44:53 -0400
committerKeith Bostic <keith.bostic@wiredtiger.com>2011-08-16 07:44:53 -0400
commitb4d0958a0b0705eb99c16d3ea975129ce87dc0ee (patch)
tree001dc49b381761648ca02997ca5547ad4d209ea4 /ext
parente325623c4620d40356855e25af7af23600c218b9 (diff)
downloadmongo-b4d0958a0b0705eb99c16d3ea975129ce87dc0ee.tar.gz
Replace fprintf(stderr) with call to wiredtiger_err_printf, using
Michael's WT_EXTENSION_API interface.
Diffstat (limited to 'ext')
-rw-r--r--ext/compressors/bzip2_compress/bzip2_compress.c8
-rw-r--r--ext/compressors/nop_compress/nop_compress.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/ext/compressors/bzip2_compress/bzip2_compress.c b/ext/compressors/bzip2_compress/bzip2_compress.c
index 393d236b99c..56a9f45bd9b 100644
--- a/ext/compressors/bzip2_compress/bzip2_compress.c
+++ b/ext/compressors/bzip2_compress/bzip2_compress.c
@@ -5,8 +5,6 @@
#include <wiredtiger.h>
#include <wiredtiger_ext.h>
-#define __UNUSED(v) ((void)(v))
-
WT_EXTENSION_API *wt_api;
static int
@@ -16,6 +14,8 @@ bzip2_decompress(WT_COMPRESSOR *, WT_SESSION *, const WT_ITEM *, WT_ITEM *);
static WT_COMPRESSOR bzip2_compressor = { bzip2_compress, bzip2_decompress };
+#define __UNUSED(v) ((void)(v))
+
/* between 0-4: set the amount of verbosity to stderr */
static const int bz_verbosity = 0;
@@ -54,8 +54,6 @@ bzip2_convert_error(WT_SESSION *wt_session, int bzret)
{
const char *msg;
- __UNUSED(wt_session);
-
switch (bzret) { /* Some errors are anticipated */
case BZ_MEM_ERROR:
return (ENOMEM);
@@ -94,7 +92,7 @@ bzip2_convert_error(WT_SESSION *wt_session, int bzret)
* XXX
* This needs to get pushed back to the session handle somehow.
*/
- fprintf(stderr, "bzip2 error: %s: %d\n", msg, bzret);
+ wiredtiger_err_printf(wt_session, "bzip2 error: %s: %d\n", msg, bzret);
return (WT_ERROR);
}
diff --git a/ext/compressors/nop_compress/nop_compress.c b/ext/compressors/nop_compress/nop_compress.c
index e1a825cb9a5..260547cc7e9 100644
--- a/ext/compressors/nop_compress/nop_compress.c
+++ b/ext/compressors/nop_compress/nop_compress.c
@@ -4,7 +4,7 @@
#include <wiredtiger.h>
#include <wiredtiger_ext.h>
-#define __UNUSED(v) ((void)(v))
+WT_EXTENSION_API *wt_api;
static int
nop_compress(WT_COMPRESSOR *, WT_SESSION *, const WT_ITEM *, WT_ITEM *);
@@ -13,6 +13,8 @@ nop_decompress(WT_COMPRESSOR *, WT_SESSION *, const WT_ITEM *, WT_ITEM *);
static WT_COMPRESSOR nop_compressor = { nop_compress, nop_decompress };
+#define __UNUSED(v) ((void)(v))
+
int
wiredtiger_extension_init(
WT_CONNECTION *conn, WT_EXTENSION_API *api, const char *config)