parse-options new features.
[gitweb.git] / git-compat-util.h
index 7b29d1b905c618a50704a7b2c38041f71c942e71..f86b19f162fdc64daf88e5013efe0c90be3f6c1c 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)