summaryrefslogtreecommitdiff
path: root/x11/rxvt-unicode/patches/patch-bb
blob: 21e90cffe7efa941a1cc85698d8dec85d44144a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-bb,v 1.1 2009/09/03 19:29:26 roy Exp $

Check for popcount in libc

--- src/rxvtutil.h	2008-11-05 14:43:24.000000000 +0000
+++ src/rxvtutil.h	2009-09-03 20:19:38.000000000 +0100
@@ -94,12 +94,16 @@
 // some bit functions, xft fuck me plenty
 #if HAVE_GCC_BUILTINS
 static inline int ctz      (unsigned int x) { return __builtin_ctz      (x); }
+#if !HAVE_POPCOUNT
 static inline int popcount (unsigned int x) { return __builtin_popcount (x); }
+#endif
 #else
 // count trailing zero bits and count # of one bits
 int ctz      (unsigned int x) CONST;
+#if !HAVE_POPCOUNT
 int popcount (unsigned int x) CONST;
 #endif
+#endif
 
 // in range including end
 #define IN_RANGE_INC(val,beg,end) \