summaryrefslogtreecommitdiff
path: root/src/support/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/version.c')
-rw-r--r--src/support/version.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/support/version.c b/src/support/version.c
new file mode 100644
index 00000000000..dbd60162c16
--- /dev/null
+++ b/src/support/version.c
@@ -0,0 +1,26 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 2008-2011 WiredTiger, Inc.
+ * All rights reserved.
+ *
+ * $Id$
+ */
+
+#include "wt_internal.h"
+
+/*
+ * wiredtiger_version --
+ * Return library version information.
+ */
+char *
+wiredtiger_version(int *majorp, int *minorp, int *patchp)
+{
+ if (majorp != NULL)
+ *majorp = WIREDTIGER_VERSION_MAJOR;
+ if (minorp != NULL)
+ *minorp = WIREDTIGER_VERSION_MINOR;
+ if (patchp != NULL)
+ *patchp = WIREDTIGER_VERSION_PATCH;
+ return ((char *)WIREDTIGER_VERSION_STRING);
+}