12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- diff -Nur busybox-1.17.2.orig/include/platform.h busybox-1.17.2/include/platform.h
- --- busybox-1.17.2.orig/include/platform.h 2010-08-23 02:44:35.000000000 +0200
- +++ busybox-1.17.2/include/platform.h 2010-09-28 15:20:33.000000000 +0200
- @@ -152,27 +152,37 @@
-
- #if defined(__digital__) && defined(__unix__)
- # include <sex.h>
- -# define __BIG_ENDIAN__ (BYTE_ORDER == BIG_ENDIAN)
- -# define __BYTE_ORDER BYTE_ORDER
- -#elif defined __FreeBSD__
- +#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) \
- + || defined(__APPLE__)
- # include <sys/resource.h> /* rlimit */
- # include <machine/endian.h>
- # define bswap_64 __bswap64
- # define bswap_32 __bswap32
- # define bswap_16 __bswap16
- -# define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN)
- -#elif !defined __APPLE__
- +#else
- # include <byteswap.h>
- # include <endian.h>
- #endif
-
- -#if defined(__BIG_ENDIAN__) && __BIG_ENDIAN__
- +#if defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
- # define BB_BIG_ENDIAN 1
- # define BB_LITTLE_ENDIAN 0
- -#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
- +#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN
- +# define BB_BIG_ENDIAN 0
- +# define BB_LITTLE_ENDIAN 1
- +#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN
- # define BB_BIG_ENDIAN 1
- # define BB_LITTLE_ENDIAN 0
- -#elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__)
- +#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN
- +# define BB_BIG_ENDIAN 0
- +# define BB_LITTLE_ENDIAN 1
- +#elif defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
- +# define BB_BIG_ENDIAN 1
- +# define BB_LITTLE_ENDIAN 0
- +#elif defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN
- +# define BB_BIG_ENDIAN 0
- +# define BB_LITTLE_ENDIAN 1
- +#elif defined(__386__)
- # define BB_BIG_ENDIAN 0
- # define BB_LITTLE_ENDIAN 1
- #else
|