Advertisement
Guest User

htonll

a guest
Apr 23rd, 2010
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #define htonll(x) \
  2. ((((x) & 0xff00000000000000LL) >> 56) | \
  3. (((x) & 0x00ff000000000000LL) >> 40) | \
  4. (((x) & 0x0000ff0000000000LL) >> 24) | \
  5. (((x) & 0x000000ff00000000LL) >> 8) | \
  6. (((x) & 0x00000000ff000000LL) << 8) | \
  7. (((x) & 0x0000000000ff0000LL) << 24) | \
  8. (((x) & 0x000000000000ff00LL) << 40) | \
  9. (((x) & 0x00000000000000ffLL) << 56))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement