utils: nuke bitfield functions and macros
The bitfield functions and macros were committed without explaining their purpose in the commit message. As they are only used in uci, and conflict with similar functions added in hostapd, breaking our hostapd ubus patch, nuke them from libubox and add them in uci instead. If we need them anywhere else in the future we can add it to libubox again, but preferably prefixed with ubox_. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
parent
f714be125c
commit
632688e8d6
1 changed files with 0 additions and 16 deletions
16
utils.h
16
utils.h
|
@ -170,22 +170,6 @@ static inline uint16_t __u_bswap16(uint16_t val)
|
||||||
#define __hidden __attribute__((visibility("hidden")))
|
#define __hidden __attribute__((visibility("hidden")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef BITS_PER_LONG
|
|
||||||
#define BITS_PER_LONG (8 * sizeof(unsigned long))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define BITFIELD_SIZE(_n) (((_n) + (BITS_PER_LONG - 1)) / BITS_PER_LONG)
|
|
||||||
|
|
||||||
static inline void bitfield_set(unsigned long *bits, int bit)
|
|
||||||
{
|
|
||||||
bits[bit / BITS_PER_LONG] |= (1UL << (bit % BITS_PER_LONG));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool bitfield_test(unsigned long *bits, int bit)
|
|
||||||
{
|
|
||||||
return !!(bits[bit / BITS_PER_LONG] & (1UL << (bit % BITS_PER_LONG)));
|
|
||||||
}
|
|
||||||
|
|
||||||
int b64_encode(const void *src, size_t src_len,
|
int b64_encode(const void *src, size_t src_len,
|
||||||
void *dest, size_t dest_len);
|
void *dest, size_t dest_len);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue