mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
memrev variants only doing the work if the target host is big endian
This commit is contained in:
parent
bcde63785d
commit
b5325132f1
10
src/endian.h
10
src/endian.h
@ -5,4 +5,14 @@ void memrev16(void *p);
|
||||
void memrev32(void *p);
|
||||
void memrev64(void *p);
|
||||
|
||||
/* variants of the function doing the actual convertion only if the target
|
||||
* host is big endian */
|
||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||
#define memrev16ifbe(p)
|
||||
#define memrev32ifbe(p)
|
||||
#define memrev64ifbe(p)
|
||||
#else
|
||||
#define memrev16ifbe(p) memrev16(p)
|
||||
#define memrev32ifbe(p) memrev32(p)
|
||||
#define memrev64ifbe(p) memrev64(p)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user