This macro - taken from the linux kernel source - improves readability
of single bit definitions.

Signed-off-by: Bartosz Golaszewski <bartekg...@gmail.com>
---
 include/libbb.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/libbb.h b/include/libbb.h
index d05ac29..fcad060 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -292,6 +292,8 @@ struct BUG_off_t_size_is_misdetected {
 #undef SKIP
 #define SKIP   ((int) 2)
 
+#define BIT(nr) (1UL << (nr))
+
 /* Macros for min/max.  */
 #ifndef MIN
 #define MIN(a,b) (((a)<(b))?(a):(b))
-- 
2.1.4

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to