Move gitk to its own subdirectory
[gitweb.git] / git-compat-util.h
index ede9408bbd14880b3534110586562c2e6df8b07b..276a43724d91781a6c6d79b283ef526e09917c87 100644 (file)
@@ -20,6 +20,7 @@
 #endif
 
 #define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits))))
+#define HAS_MULTI_BITS(i)  ((i) & ((i) - 1))  /* checks if an integer has more than 1 bit set */
 
 /* Approximation of the length of the decimal representation of this type. */
 #define decimal_length(x)      ((int)(sizeof(x) * 2.56 + 0.5) + 1)