diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-25 08:48:32 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-25 08:48:32 +0000 |
commit | 8308e63eb1f9203e53f13698e7a2bfb362ccceaf (patch) | |
tree | 435d981cc0bc9a26791fbc75f16e8357b2663ffd /libmpdvdkit2/bswap.h | |
parent | 22a08bc3465e256fa78f59649b30aa8c1efecdf5 (diff) | |
download | mpv-8308e63eb1f9203e53f13698e7a2bfb362ccceaf.tar.bz2 mpv-8308e63eb1f9203e53f13698e7a2bfb362ccceaf.tar.xz |
DragonFly BSD support
patch by Joerg Sonnenberger <joerg - at - britannica - dot - bec - dot - de>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15567 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdvdkit2/bswap.h')
-rw-r--r-- | libmpdvdkit2/bswap.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libmpdvdkit2/bswap.h b/libmpdvdkit2/bswap.h index 53abd3c2e5..240f06e16f 100644 --- a/libmpdvdkit2/bswap.h +++ b/libmpdvdkit2/bswap.h @@ -88,12 +88,17 @@ inline static unsigned long long int bswap_64(unsigned long long int x) } #define B2N_64(x) x = bswap_64(x) +#elif defined(__DragonFly__) +#include <sys/endian.h> +#define B2N_16(x) x = be16toh(x) +#define B2N_32(x) x = be32toh(x) +#define B2N_64(x) x = be64toh(x) + /* This is a slow but portable implementation, it has multiple evaluation * problems so beware. * FreeBSD and Solaris don't have <byteswap.h> or any other such * functionality! */ - #elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(__CYGWIN__) #define B2N_16(x) \ x = ((((x) & 0xff00) >> 8) | \ |