OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b051c67
)
Add btohll / htobll macros
author
Andrei Emeltchenko
<andrei.emeltchenko@intel.com>
Tue, 18 Oct 2011 08:23:11 +0000
(11:23 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Fri, 21 Oct 2011 08:08:24 +0000
(11:08 +0300)
Handle 64 bit swap
lib/bluetooth.h
patch
|
blob
|
history
diff --git
a/lib/bluetooth.h
b/lib/bluetooth.h
index
738e07a
..
b0680e2
100644
(file)
--- 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