Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
ewah: fix building with gcc < 3.4.0
author
Tom G. Christensen
<tgc@statsbiblioteket.dk>
Wed, 4 Feb 2015 08:23:16 +0000
(09:23 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 4 Feb 2015 18:45:31 +0000
(10:45 -0800)
The __builtin_ctzll function was added in gcc 3.4.0.
This extends the check for gcc so that use of __builtin_ctzll is only
enabled if gcc >= 3.4.0.
Signed-off-by: Tom G. Christensen <tgc@statsbiblioteket.dk>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ewah/ewok.h
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
b500721
)
diff --git
a/ewah/ewok.h
b/ewah/ewok.h
index 43adeb5c6893381918ea948efa70b4756f831583..4b95847680fed3d534309b100fe00e3cdca5cb21 100644
(file)
--- a/
ewah/ewok.h
+++ b/
ewah/ewok.h
@@
-47,7
+47,8
@@
static inline uint32_t ewah_bit_popcount64(uint64_t x)
return (x * 0x0101010101010101ULL) >> 56;
}
-#ifdef __GNUC__
+/* __builtin_ctzll was not available until 3.4.0 */
+#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 3))
#define ewah_bit_ctz64(x) __builtin_ctzll(x)
#else
static inline int ewah_bit_ctz64(uint64_t x)