forked from len0rd/rockbox
Replaced htonl() with a more portable byteswap macro.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5704 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
70bf516db1
commit
b357854708
1 changed files with 5 additions and 3 deletions
|
|
@ -43,9 +43,11 @@
|
|||
#include "lang.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
#ifdef LITTLE_ENDIAN
|
||||
#include <netinet/in.h>
|
||||
#define BE32(_x_) htonl(_x_)
|
||||
#if defined(LITTLE_ENDIAN) || defined(_X86_)
|
||||
#define BE32(_x_) (((_x_ & 0xff000000) >> 24) | \
|
||||
((_x_ & 0x00ff0000) >> 8) | \
|
||||
((_x_ & 0x0000ff00) << 8) | \
|
||||
((_x_ & 0x000000ff) << 24))
|
||||
#else
|
||||
#define BE32(_x_) _x_
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue