blob: cef941843beea5ba2544d4526756126d828e9948 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2008-2011 WiredTiger, Inc.
* All rights reserved.
*
* $Id$
*/
/* Utility introduction: get the program name, and check the version. */
#define WT_UTILITY_INTRO(prog, argv) do { \
int __major, __minor; \
if (((prog) = strrchr((argv)[0], '/')) == NULL) \
(prog) = (argv)[0]; \
else \
++(prog); \
(void)wiredtiger_version(&__major, &__minor, NULL); \
if (__major != WIREDTIGER_VERSION_MAJOR || \
__minor != WIREDTIGER_VERSION_MINOR) { \
fprintf(stderr, \
"%s: program build version %d.%d doesn't match " \
"library build version %d.%d\n", \
(prog), WIREDTIGER_VERSION_MAJOR, \
WIREDTIGER_VERSION_MINOR, __major, __minor); \
return (EXIT_FAILURE); \
} \
} while (0)
|