BUILD/MINOR: tools: rename popcount to my_popcountl
This is in order to avoid conflicting with NetBSD popcount* functions
since 6.x release, the final l to mentions the argument is a long like
NetBSD does.
This patch could be backported to 1.5 to fix the build issue there as well.
diff --git a/include/common/standard.h b/include/common/standard.h
index df2444d..ec56654 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -621,8 +621,8 @@
return result;
}
-/* Simple popcount implementation. It returns the number of ones in a word */
-static inline unsigned int popcount(unsigned long a)
+/* Simple popcountl implementation. It returns the number of ones in a word */
+static inline unsigned int my_popcountl(unsigned long a)
{
unsigned int cnt;
for (cnt = 0; a; a >>= 1) {
@@ -632,7 +632,7 @@
return cnt;
}
-/* Build a word with the <bits> lower bits set (reverse of popcount) */
+/* Build a word with the <bits> lower bits set (reverse of my_popcountl) */
static inline unsigned long nbits(int bits)
{
if (--bits < 0)