chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make all search results visible.
[disorder]
/
lib
/
bits.h
diff --git
a/lib/bits.h
b/lib/bits.h
index 856db683c2a283036f0b70db4c21c11a1a97977d..e0f7c6289991d093833e2886588a3315aca9d0a8 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 */