Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b5325132
Commit
b5325132
authored
Mar 09, 2011
by
antirez
Browse files
memrev variants only doing the work if the target host is big endian
parent
bcde6378
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/endian.h
View file @
b5325132
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment