X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwimlib_internal.h;h=4b10dbfa69a9c053c9829c44486a1ce28e7339bc;hp=9d25e1e9c34e4b5c5087da5decedcab9ed4646d8;hb=8f16067f71da5f45eda84813e9a07e68641bc283;hpb=36a737d734cdc6c6eb0ce9da3183a1f8fa4288e6 diff --git a/src/wimlib_internal.h b/src/wimlib_internal.h index 9d25e1e9..4b10dbfa 100644 --- a/src/wimlib_internal.h +++ b/src/wimlib_internal.h @@ -35,6 +35,23 @@ #include #endif +#define WIMLIB_MAKEVERSION(major, minor, patch) \ + ((major << 20) | (minor << 10) | patch) + + +#define WIMLIB_VERSION_CODE \ + WIMLIB_MAKEVERSION(WIMLIB_MAJOR_VERSION,\ + WIMLIB_MINOR_VERSION,\ + WIMLIB_PATCH_VERSION) + +#define WIMLIB_GET_PATCH_VERSION(version) \ + ((version >> 0) & ((1 << 10) - 1)) +#define WIMLIB_GET_MINOR_VERSION(version) \ + ((version >> 10) & ((1 << 10) - 1)) +#define WIMLIB_GET_MAJOR_VERSION(version) \ + ((version >> 20) & ((1 << 10) - 1)) + + struct stat; struct dentry; struct inode;