Created
October 8, 2013 19:00
-
-
Save houmei/6889756 to your computer and use it in GitHub Desktop.
GNU-APL1.0 for MacOSX trial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define __swap64gen(x) \ | |
(__uint64_t)((((__uint64_t)(x) & 0xff) << 56) | \ | |
((__uint64_t)(x) & 0xff00ULL) << 40 | \ | |
((__uint64_t)(x) & 0xff0000ULL) << 24 | \ | |
((__uint64_t)(x) & 0xff000000ULL) << 8 | \ | |
((__uint64_t)(x) & 0xff00000000ULL) >> 8 | \ | |
((__uint64_t)(x) & 0xff0000000000ULL) >> 24 | \ | |
((__uint64_t)(x) & 0xff000000000000ULL) >> 40 | \ | |
((__uint64_t)(x) & 0xff00000000000000ULL) >> 56) | |
#define htobe64 __swap64gen | |
#define be64toh __swap64gen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment