X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-compat-util.h;h=9f941e42b16d927f738b4911b41344dd2f3ed0da;hb=c32056e0ef193002f80d75fd795e156ddf65c4ab;hp=6dfc0ddd90ae6abc7863086f520a678c545850a5;hpb=f630cfda8800aee03c7eb2fcd0f840730fbe43b9;p=git.git diff --git a/git-compat-util.h b/git-compat-util.h index 6dfc0ddd9..9f941e42b 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -37,6 +37,8 @@ #define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (bitsizeof(x) - (bits)))) #define HAS_MULTI_BITS(i) ((i) & ((i) - 1)) /* checks if an integer has more than 1 bit set */ +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) + /* Approximation of the length of the decimal representation of this type. */ #define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)