File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1+ #include <stddef.h>
2+ #include <assert.h>
3+
4+ #include "version.h"
5+
6+ #define STATIC_ASSERT (COND ,MSG ) typedef char static_assertion[(COND)?1:-1]
7+
8+ #define STRINGIFY (x ) #x
9+ #define TOSTRING (x ) STRINGIFY(x)
10+ #define LIBRDB_COMPOSED_VERSION_STRING TOSTRING(LIBRDB_MAJOR_VERSION) "." \
11+ TOSTRING(LIBRDB_MINOR_VERSION) "." \
12+ TOSTRING(LIBRDB_PATCH_VERSION)
13+
14+ /* Verify that the composed version string matches the individual version components */
15+ STATIC_ASSERT (
16+ (sizeof (LIBRDB_VERSION_STRING ) == sizeof (LIBRDB_COMPOSED_VERSION_STRING )) &&
17+ (__builtin_strcmp (LIBRDB_VERSION_STRING , LIBRDB_COMPOSED_VERSION_STRING ) == 0 ),
18+ "LIBRDB_VERSION_STRING does not match the individual version components"
19+ );
Original file line number Diff line number Diff line change 1- #define LIBRDB_MAJOR_VERSION 0
1+ #define LIBRDB_MAJOR_VERSION 1
22#define LIBRDB_MINOR_VERSION 0
3- #define LIBRDB_PATCH_VERSION 1
3+ #define LIBRDB_PATCH_VERSION 0
44
55/* Keep direct value for external readers */
6- #define LIBRDB_VERSION_STRING "0 .0.1 "
6+ #define LIBRDB_VERSION_STRING "1 .0.0 "
77
88/* Update Maximum supported RDB version */
99#define LIBRDB_SUPPORT_MAX_RDB_VER 12
You can’t perform that action at this time.
0 commit comments