Code

lib-patch-mode.sh: Fix permission
[git.git] / git-compat-util.h
index 6dfc0ddd90ae6abc7863086f520a678c545850a5..9f941e42b16d927f738b4911b41344dd2f3ed0da 100644 (file)
@@ -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)