aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:28:42 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:28:42 +1000
commitc6933c626b97c3f6bc446586ee2e6c7d9930c938 (patch)
tree4999c2e1279c4b74747735adde3a047fec94b651 /include/platform.h
parentec71cb6575290eb6ad716e4f620db445d8e1bcd3 (diff)
parent95b83ba4f81f0985e2aeb9aec9cd67db7d5d1126 (diff)
downloadbusybox-w32-c6933c626b97c3f6bc446586ee2e6c7d9930c938.tar.gz
busybox-w32-c6933c626b97c3f6bc446586ee2e6c7d9930c938.tar.bz2
busybox-w32-c6933c626b97c3f6bc446586ee2e6c7d9930c938.zip
Merge branch 'origin/master' (early part)
Conflicts: include/platform.h
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/platform.h b/include/platform.h
index 9458e2e02..2f3639d9c 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -178,7 +178,7 @@
178# define bswap_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0xFF) << 8)) 178# define bswap_16(x) ((((x) & 0xFF00) >> 8) | (((x) & 0xFF) << 8))
179# define bswap_32(x) ((bswap_16(((x) & 0xFFFF0000L) >> 16)) | (bswap_16((x) & 0xFFFFL) << 16)) 179# define bswap_32(x) ((bswap_16(((x) & 0xFFFF0000L) >> 16)) | (bswap_16((x) & 0xFFFFL) << 16))
180# define bswap_64(x) ((bswap_32(((x) & 0xFFFFFFFF00000000LL) >> 32)) | (bswap_32((x) & 0xFFFFFFFFLL) << 32)) 180# define bswap_64(x) ((bswap_32(((x) & 0xFFFFFFFF00000000LL) >> 32)) | (bswap_32((x) & 0xFFFFFFFFLL) << 32))
181#elif !defined __APPLE__ 181#elif !defined __APPLE__ && !defined __OpenBSD__
182# include <byteswap.h> 182# include <byteswap.h>
183# include <endian.h> 183# include <endian.h>
184#endif 184#endif
@@ -189,9 +189,15 @@
189#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN 189#elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN
190# define BB_BIG_ENDIAN 1 190# define BB_BIG_ENDIAN 1
191# define BB_LITTLE_ENDIAN 0 191# define BB_LITTLE_ENDIAN 0
192#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN
193# define BB_BIG_ENDIAN 1
194# define BB_LITTLE_ENDIAN 0
192#elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__) 195#elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__)
193# define BB_BIG_ENDIAN 0 196# define BB_BIG_ENDIAN 0
194# define BB_LITTLE_ENDIAN 1 197# define BB_LITTLE_ENDIAN 1
198#elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN
199# define BB_BIG_ENDIAN 0
200# define BB_LITTLE_ENDIAN 1
195#else 201#else
196# error "Can't determine endianness" 202# error "Can't determine endianness"
197#endif 203#endif
@@ -247,7 +253,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING;
247/* ---- Compiler dependent settings ------------------------- */ 253/* ---- Compiler dependent settings ------------------------- */
248 254
249#if (defined __digital__ && defined __unix__) \ 255#if (defined __digital__ && defined __unix__) \
250 || defined __APPLE__ || defined __FreeBSD__ \ 256 || defined __APPLE__ || defined __FreeBSD__ || defined __OpenBSD__ \
251 || ENABLE_PLATFORM_MINGW32 257 || ENABLE_PLATFORM_MINGW32
252# undef HAVE_MNTENT_H 258# undef HAVE_MNTENT_H
253# undef HAVE_SYS_STATFS_H 259# undef HAVE_SYS_STATFS_H