diff options
author | Timo Teräs <timo.teras@iki.fi> | 2019-12-13 15:22:33 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-04-01 15:58:49 +0300 |
commit | e79226010a0641f701b6e12392e176cc2cf58d72 (patch) | |
tree | dec5311a1fc0cfb837b4af4038cab7bdedc2bb4c /src/apk_defines.h | |
parent | d6c54f932054c58aee8f7a6d2bd49b115d804da1 (diff) | |
download | aports-v3.0-wip.tar.bz2 aports-v3.0-wip.tar.xz |
adb: introduce apk-tools database format, and few appletsv3.0-wip
This is a flat buffers inspired format that allows fast
mmaped access to the data with low overhead, signature support
and relatively good forward support.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 1cd8b6cd47..1053b4acf9 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -36,6 +36,7 @@ #define EAPKBADURL 1024 #define EAPKSTALEINDEX 1025 +#define EAPKFORMAT 1026 static inline void *ERR_PTR(long error) { return (void*) error; } static inline void *ERR_CAST(const void *ptr) { return (void*) ptr; } @@ -65,6 +66,9 @@ static inline int IS_ERR_OR_NULL(const void *ptr) { return IS_ERR(ptr) || !ptr; (type *)( (char *)__mptr - offsetof(type,member) );}) #endif +#define ROUND_DOWN(x,a) ((x) & ~(a-1)) +#define ROUND_UP(x,a) (((x)+(a)-1) & ~((a)-1)) + extern int apk_verbosity; extern unsigned int apk_flags, apk_force; extern const char *apk_arch; |