/usr/include/diet/byteswap.h is in dietlibc-dev 0.33~cvs20120325-6+deb8u1.
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 | #ifndef _BYTESWAP_H
#define _BYTESWAP_H
#warning "byteswap.h is an unportable GNU extension! Don't use!"
static inline unsigned short bswap_16(unsigned short x) {
return (x>>8) | (x<<8);
}
static inline unsigned int bswap_32(unsigned int x) {
return (bswap_16(x&0xffff)<<16) | (bswap_16(x>>16));
}
static inline unsigned long long bswap_64(unsigned long long x) {
return (((unsigned long long)bswap_32(x&0xffffffffull))<<32) | (bswap_32(x>>32));
}
#endif
|