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.
(cherry picked from commit e6c39416682863d1eaee3acd45ccaadf96f76b12)
diff --git a/include/common/standard.h b/include/common/standard.h
index 8811c6f..d6976ca 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -565,8 +565,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) {
@@ -576,7 +576,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)