1
0
Fork 0
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:
Björn Stenberg 2005-01-28 23:04:19 +00:00
parent 70bf516db1
commit b357854708

View file

@ -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