]>
git.saurik.com Git - redis.git/blob - src/endian.h
4 void memrev16(void *p
);
5 void memrev32(void *p
);
6 void memrev64(void *p
);
7 uint16_t intrev16(uint16_t v
);
8 uint32_t intrev32(uint32_t v
);
9 uint64_t intrev64(uint64_t v
);
11 /* variants of the function doing the actual convertion only if the target
12 * host is big endian */
13 #if (BYTE_ORDER == LITTLE_ENDIAN)
14 #define memrev16ifbe(p)
15 #define memrev32ifbe(p)
16 #define memrev64ifbe(p)
17 #define intrev16ifbe(v) (v)
18 #define intrev32ifbe(v) (v)
19 #define intrev64ifbe(v) (v)
21 #define memrev16ifbe(p) memrev16(p)
22 #define memrev32ifbe(p) memrev32(p)
23 #define memrev64ifbe(p) memrev64(p)
24 #define intrev16ifbe(v) intrev16(v)
25 #define intrev32ifbe(v) intrev32(v)
26 #define intrev64ifbe(v) intrev64(v)