diff options
| author | Waldemar Brodkorb <wbx@openadk.org> | 2010-08-06 09:17:26 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-06 09:17:26 +0200 |
| commit | 95b83ba4f81f0985e2aeb9aec9cd67db7d5d1126 (patch) | |
| tree | 7a49570f8089af0e9f012ea5a4cf37a7daf38096 /include | |
| parent | 6814cbc9288601840aedb372e2bd84dab76ffa43 (diff) | |
| download | busybox-w32-95b83ba4f81f0985e2aeb9aec9cd67db7d5d1126.tar.gz busybox-w32-95b83ba4f81f0985e2aeb9aec9cd67db7d5d1126.tar.bz2 busybox-w32-95b83ba4f81f0985e2aeb9aec9cd67db7d5d1126.zip | |
OpenBSD compatibility
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 14 | ||||
| -rw-r--r-- | include/platform.h | 10 |
2 files changed, 15 insertions, 9 deletions
diff --git a/include/libbb.h b/include/libbb.h index c043506b9..118d777bc 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -41,16 +41,16 @@ | |||
| 41 | #include <limits.h> | 41 | #include <limits.h> |
| 42 | #include <sys/param.h> | 42 | #include <sys/param.h> |
| 43 | #ifdef HAVE_MNTENT_H | 43 | #ifdef HAVE_MNTENT_H |
| 44 | #include <mntent.h> | 44 | # include <mntent.h> |
| 45 | #endif | 45 | #endif |
| 46 | #ifdef HAVE_SYS_STATFS_H | 46 | #ifdef HAVE_SYS_STATFS_H |
| 47 | #include <sys/statfs.h> | 47 | # include <sys/statfs.h> |
| 48 | #endif | 48 | #endif |
| 49 | #if ENABLE_SELINUX | 49 | #if ENABLE_SELINUX |
| 50 | #include <selinux/selinux.h> | 50 | # include <selinux/selinux.h> |
| 51 | #include <selinux/context.h> | 51 | # include <selinux/context.h> |
| 52 | #include <selinux/flask.h> | 52 | # include <selinux/flask.h> |
| 53 | #include <selinux/av_permissions.h> | 53 | # include <selinux/av_permissions.h> |
| 54 | #endif | 54 | #endif |
| 55 | #if ENABLE_LOCALE_SUPPORT | 55 | #if ENABLE_LOCALE_SUPPORT |
| 56 | # include <locale.h> | 56 | # include <locale.h> |
| @@ -70,7 +70,7 @@ | |||
| 70 | # include <shadow.h> | 70 | # include <shadow.h> |
| 71 | # endif | 71 | # endif |
| 72 | #endif | 72 | #endif |
| 73 | #if defined __FreeBSD__ | 73 | #if defined __FreeBSD__ || defined __OpenBSD__ |
| 74 | # include <netinet/in.h> | 74 | # include <netinet/in.h> |
| 75 | # include <arpa/inet.h> | 75 | # include <arpa/inet.h> |
| 76 | #elif defined __APPLE__ | 76 | #elif defined __APPLE__ |
diff --git a/include/platform.h b/include/platform.h index 0dadf42bd..1cc588690 100644 --- a/include/platform.h +++ b/include/platform.h | |||
| @@ -161,7 +161,7 @@ | |||
| 161 | # define bswap_32 __bswap32 | 161 | # define bswap_32 __bswap32 |
| 162 | # define bswap_16 __bswap16 | 162 | # define bswap_16 __bswap16 |
| 163 | # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) | 163 | # define __BIG_ENDIAN__ (_BYTE_ORDER == _BIG_ENDIAN) |
| 164 | #elif !defined __APPLE__ | 164 | #elif !defined __APPLE__ && !defined __OpenBSD__ |
| 165 | # include <byteswap.h> | 165 | # include <byteswap.h> |
| 166 | # include <endian.h> | 166 | # include <endian.h> |
| 167 | #endif | 167 | #endif |
| @@ -172,9 +172,15 @@ | |||
| 172 | #elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN | 172 | #elif defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN |
| 173 | # define BB_BIG_ENDIAN 1 | 173 | # define BB_BIG_ENDIAN 1 |
| 174 | # define BB_LITTLE_ENDIAN 0 | 174 | # define BB_LITTLE_ENDIAN 0 |
| 175 | #elif defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN | ||
| 176 | # define BB_BIG_ENDIAN 1 | ||
| 177 | # define BB_LITTLE_ENDIAN 0 | ||
| 175 | #elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__) | 178 | #elif (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || defined(__386__) |
| 176 | # define BB_BIG_ENDIAN 0 | 179 | # define BB_BIG_ENDIAN 0 |
| 177 | # define BB_LITTLE_ENDIAN 1 | 180 | # define BB_LITTLE_ENDIAN 1 |
| 181 | #elif defined(_BYTE_ORDER) && _BYTE_ORDER == _LITTLE_ENDIAN | ||
| 182 | # define BB_BIG_ENDIAN 0 | ||
| 183 | # define BB_LITTLE_ENDIAN 1 | ||
| 178 | #else | 184 | #else |
| 179 | # error "Can't determine endianness" | 185 | # error "Can't determine endianness" |
| 180 | #endif | 186 | #endif |
| @@ -230,7 +236,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | |||
| 230 | /* ---- Compiler dependent settings ------------------------- */ | 236 | /* ---- Compiler dependent settings ------------------------- */ |
| 231 | 237 | ||
| 232 | #if (defined __digital__ && defined __unix__) \ | 238 | #if (defined __digital__ && defined __unix__) \ |
| 233 | || defined __APPLE__ || defined __FreeBSD__ | 239 | || defined __APPLE__ || defined __FreeBSD__ || defined __OpenBSD__ |
| 234 | # undef HAVE_MNTENT_H | 240 | # undef HAVE_MNTENT_H |
| 235 | # undef HAVE_SYS_STATFS_H | 241 | # undef HAVE_SYS_STATFS_H |
| 236 | #else | 242 | #else |
