|
zagor: apps dbtree.c,1.10,1.11: msg#00219systems.archos.rockbox.cvs
Update of /cvsroot/rockbox/apps In directory labb:/tmp/cvs-serv549 Modified Files: dbtree.c Log Message: Replaced htonl() with a more portable byteswap macro. Index: dbtree.c =================================================================== RCS file: /cvsroot/rockbox/apps/dbtree.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- dbtree.c 27 Jan 2005 22:21:07 -0000 1.10 +++ dbtree.c 28 Jan 2005 23:04:19 -0000 1.11 @@ -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 _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox-cvs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | hohensoh: apps tree.c,1.293,1.294: 00219, cvs |
|---|---|
| Next by Date: | bagder: bootloader Makefile,1.1,1.2: 00219, cvs |
| Previous by Thread: | hohensoh: apps tree.c,1.293,1.294i: 00219, cvs |
| Next by Thread: | bagder: bootloader Makefile,1.1,1.2: 00219, cvs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |