09df8c6f3e03c795ff8610b275c6bc59c9a58fe1
1 #ifndef __NETIFD_UTILS_H
2 #define __NETIFD_UTILS_H
4 #include <libubox/list.h>
7 #define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
9 #define DPRINTF(format, ...) no_debug(format, ## __VA_ARGS__)
12 static inline void no_debug(const char *fmt
, ...)
16 #define __init __attribute__((constructor))
19 static inline int fls(int x
)
25 if (!(x
& 0xffff0000u
)) {
29 if (!(x
& 0xff000000u
)) {
33 if (!(x
& 0xf0000000u
)) {
37 if (!(x
& 0xc0000000u
)) {
41 if (!(x
& 0x80000000u
)) {
49 int avl_strcmp(const void *k1
, const void *k2
, void *ptr
);