mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 19:41:47 +01:00
refs #5629 add 64 bit host to net ordering
git-svn-id: file:///svn/toku/tokudb@50317 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
67bf34707f
commit
c4a230cb1d
1 changed files with 11 additions and 0 deletions
|
@ -22,5 +22,16 @@ static inline uint32_t toku_ntohl(uint32_t i) {
|
|||
return ntohl(i);
|
||||
}
|
||||
|
||||
static inline uint64_t toku_htonl64(uint64_t i) {
|
||||
uint64_t a = ((uint64_t) htonl(i & 0xFFFFFFFF)) << 32;
|
||||
uint64_t b = htonl(i >> 32);
|
||||
return a | b;
|
||||
}
|
||||
|
||||
static inline uint64_t toku_ntohl64(uint64_t i) {
|
||||
uint64_t a = ((uint64_t) ntohl(i & 0xFFFFFFFF)) << 32;
|
||||
uint64_t b = ntohl(i >> 32);
|
||||
return a | b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue