diff options
| author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-02-28 15:54:36 +0000 |
|---|---|---|
| committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-02-28 15:54:36 +0000 |
| commit | dc1bafc4e3159921148daa073dc058a6c2ba301b (patch) | |
| tree | 86616e71f5e4c9ef9f83725ba3fee862011e9d86 /src/input/libdvdread/bswap.h | |
| parent | 10ca137b817c23aec0e2113dea223a74c147bde9 (diff) | |
| download | xine-lib-dc1bafc4e3159921148daa073dc058a6c2ba301b.tar.gz xine-lib-dc1bafc4e3159921148daa073dc058a6c2ba301b.tar.bz2 | |
update to libdvdread 0.9.4
CVS patchset: 4306
CVS date: 2003/02/28 15:54:36
Diffstat (limited to 'src/input/libdvdread/bswap.h')
| -rw-r--r-- | src/input/libdvdread/bswap.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/input/libdvdread/bswap.h b/src/input/libdvdread/bswap.h index dd7417059..9c7402957 100644 --- a/src/input/libdvdread/bswap.h +++ b/src/input/libdvdread/bswap.h @@ -30,6 +30,11 @@ #else +/* For __FreeBSD_version */ +#if defined(HAVE_SYS_PARAM_H) +#include <sys/param.h> +#endif + #if defined(__linux__) #include <byteswap.h> #define B2N_16(x) x = bswap_16(x) @@ -48,9 +53,15 @@ #define B2N_32(x) x = swap32(x) #define B2N_64(x) x = swap64(x) +#elif defined(__FreeBSD__) && __FreeBSD_version >= 470000 +#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 + * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such * functionality! */ |
