/usr/include/dovecot/bits.h is in dovecot-dev 1:2.2.22-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #ifndef BITS_H
#define BITS_H
#define UINT64_SUM_OVERFLOWS(a, b) \
(a > (uint64_t)-1 - b)
#define BIT(n) (1u << (n))
size_t nearest_power(size_t num) ATTR_CONST;
unsigned int bits_required8(uint8_t num) ATTR_CONST;
static inline
unsigned int bits_required16(uint16_t num)
{
return (num <= 0xff) ? bits_required8(num)
: 8 + bits_required8(num >> 8);
}
static inline
unsigned int bits_required32(uint32_t num)
{
return (num <= 0xffff) ? bits_required16(num)
: 16 + bits_required16(num >> 16);
}
static inline
unsigned int bits_required64(uint64_t num)
{
return (num <= 0xffffffff) ? bits_required32(num)
: 32 + bits_required32(num >> 32);
}
#endif
|