]> wimlib.net Git - wimlib/blob - include/wimlib/version.h
dentry.c: Read/write dentries from structure
[wimlib] / include / wimlib / version.h
1 #ifndef _WIMLIB_VERSION_H
2 #define _WIMLIB_VERSION_H
3
4 #include "wimlib.h"
5
6 #define WIMLIB_MAKEVERSION(major, minor, patch) \
7         ((major << 20) | (minor << 10) | patch)
8
9
10 #define WIMLIB_VERSION_CODE \
11                 WIMLIB_MAKEVERSION(WIMLIB_MAJOR_VERSION,\
12                                    WIMLIB_MINOR_VERSION,\
13                                    WIMLIB_PATCH_VERSION)
14
15 #define WIMLIB_GET_PATCH_VERSION(version) \
16         ((version >> 0) & ((1 << 10) - 1))
17 #define WIMLIB_GET_MINOR_VERSION(version) \
18         ((version >> 10) & ((1 << 10) - 1))
19 #define WIMLIB_GET_MAJOR_VERSION(version) \
20         ((version >> 20) & ((1 << 10) - 1))
21
22 #endif /* _WIMLIB_VERSION_H */