lib/core: Add static assertions for OstreeRepoMode enum values

Prep for adding an alias.

Closes: #1209
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-09-21 15:44:24 -04:00 committed by Atomic Bot
parent a0588c3102
commit 1797aff6a8

View File

@ -32,6 +32,12 @@
#include "ostree-chain-input-stream.h"
#include "otutil.h"
/* Generic ABI checks */
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE == 0);
G_STATIC_ASSERT(OSTREE_REPO_MODE_ARCHIVE_Z2 == 1);
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER == 2);
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER_ONLY == 3);
#define ALIGN_VALUE(this, boundary) \
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))