diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-01-28 06:55:56 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-01-28 06:55:56 +0000 |
commit | f53229ed4ec454abe7b1ff9319977f4a94b1b9c3 (patch) | |
tree | 337e13d3ff7bb992b5d5beeeb92811d2c762f7e8 /utils | |
parent | 297503eec5adf35e7cb531ff8b15af9b2c072835 (diff) | |
download | uClibc-alpine-f53229ed4ec454abe7b1ff9319977f4a94b1b9c3.tar.bz2 uClibc-alpine-f53229ed4ec454abe7b1ff9319977f4a94b1b9c3.tar.xz |
fix typo as pointed out by Tony Wu and cleanup source
Diffstat (limited to 'utils')
-rw-r--r-- | utils/bswap.h | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/utils/bswap.h b/utils/bswap.h index 56c3a1d32..302b1673f 100644 --- a/utils/bswap.h +++ b/utils/bswap.h @@ -1,27 +1,32 @@ +/* + * Lame bswap replacements as we can't assume the host is sane and provides + * working versions of these. + */ + #ifndef _BSWAP_H #define _BSWAP_H 1 #if !defined(__BYTE_ORDER) && defined(BYTE_ORDER) -# define __BYTE_ORDER = BYTE_ORDER +# define __BYTE_ORDER BYTE_ORDER #endif #ifndef __BYTE_ORDER -#ifdef __linux__ -#include <endian.h> -#else -#define __LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */ -#define __BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ -#define __PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */ - -#if defined(sun386) || defined(i386) -#define __BYTE_ORDER __LITTLE_ENDIAN -#endif - -#if defined(sparc) -#define __BYTE_ORDER __BIG_ENDIAN -#endif - -#endif /* __linux__ */ +# ifdef __linux__ +# include <endian.h> +# else +# define __LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */ +# define __BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */ +# define __PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */ + +# if defined(sun386) || defined(i386) +# define __BYTE_ORDER __LITTLE_ENDIAN +# endif + +# if defined(sparc) +# define __BYTE_ORDER __BIG_ENDIAN +# endif + +# endif /* __linux__ */ #endif /* __BYTE_ORDER */ @@ -30,7 +35,7 @@ #endif #ifdef __linux__ -#include <byteswap.h> +# include <byteswap.h> #else static inline uint16_t bswap_16(uint16_t x) |