~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge from disorder.4.0 up to 4.0.1
[disorder]
/
lib
/
bits.h
diff --git
a/lib/bits.h
b/lib/bits.h
index
856db68
..
e0f7c62
100644
(file)
--- a/
lib/bits.h
+++ b/
lib/bits.h
@@
-25,7
+25,13
@@
#ifndef BITS_H
#define BITS_H
+#if HAVE_FLS
+static inline int leftmost_bit(uint32_t n) {
+ return fls(n) - 1;
+}
+#else
int leftmost_bit(uint32_t n);
+#endif
#endif /* BITS_H */