diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2011-10-18 11:23:11 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-10-21 11:08:24 +0300 |
commit | 011c01ed8dab9d9cf5804f4cef78f5ae34afff9d (patch) | |
tree | 0331b4001d26d60af2c53ec1237c1db23bb62c53 /lib/bluetooth.h | |
parent | b051c6708ff20b61f4e05807a95e871ef4f8264d (diff) | |
download | bluez-011c01ed8dab9d9cf5804f4cef78f5ae34afff9d.tar.gz |
Add btohll / htobll macros
Handle 64 bit swap
Diffstat (limited to 'lib/bluetooth.h')
-rw-r--r-- | lib/bluetooth.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bluetooth.h b/lib/bluetooth.h index 738e07a76..b0680e28f 100644 --- a/lib/bluetooth.h +++ b/lib/bluetooth.h @@ -93,13 +93,17 @@ enum { #if __BYTE_ORDER == __LITTLE_ENDIAN #define htobs(d) (d) #define htobl(d) (d) +#define htobll(d) (d) #define btohs(d) (d) #define btohl(d) (d) +#define btohll(d) (d) #elif __BYTE_ORDER == __BIG_ENDIAN #define htobs(d) bswap_16(d) #define htobl(d) bswap_32(d) +#define htobll(d) bswap_64(d) #define btohs(d) bswap_16(d) #define btohl(d) bswap_32(d) +#define btohll(d) bswap_64(d) #else #error "Unknown byte order" #endif |