diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-11-23 21:12:24 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2002-11-23 21:12:24 +0000 |
commit | 322ad7ebe04ed8c83be4c430029165d65aaef0c1 (patch) | |
tree | 49e8b4524c5530b986aafc3798ec02f483dfaa13 /multimedia/libdvdread/files | |
parent | 3a0f8513a18e948c8ed94b379b2e30a912b11571 (diff) |
Notes
Diffstat (limited to 'multimedia/libdvdread/files')
-rw-r--r-- | multimedia/libdvdread/files/extra-patch-dvdread::bswap.h | 17 | ||||
-rw-r--r-- | multimedia/libdvdread/files/patch-dvdread::bswap.h | 34 |
2 files changed, 51 insertions, 0 deletions
diff --git a/multimedia/libdvdread/files/extra-patch-dvdread::bswap.h b/multimedia/libdvdread/files/extra-patch-dvdread::bswap.h new file mode 100644 index 000000000000..91f08856dd37 --- /dev/null +++ b/multimedia/libdvdread/files/extra-patch-dvdread::bswap.h @@ -0,0 +1,17 @@ +--- dvdread/bswap.h.orig Sat Nov 23 18:53:53 2002 ++++ dvdread/bswap.h Sat Nov 23 18:57:27 2002 +@@ -54,6 +54,14 @@ + * functionality! + */ + ++#elif defined(__FreeBSD__) ++# define _KERNEL ++# define I486_CPU /* Will crash unless 486+ */ ++# include <machine/endian.h> ++# undef _KERNEL ++# undef I486_CPU ++# define FROM_BE_32(x) (ntohl(x)) ++ + #elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) + #define B2N_16(x) \ + x = ((((x) & 0xff00) >> 8) | \ diff --git a/multimedia/libdvdread/files/patch-dvdread::bswap.h b/multimedia/libdvdread/files/patch-dvdread::bswap.h new file mode 100644 index 000000000000..ad7f78b04ea8 --- /dev/null +++ b/multimedia/libdvdread/files/patch-dvdread::bswap.h @@ -0,0 +1,34 @@ +--- dvdread/bswap.h.orig Sat Nov 23 18:53:53 2002 ++++ dvdread/bswap.h Sat Nov 23 18:56:21 2002 +@@ -22,6 +22,10 @@ + + #include <config.h> + ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + #if defined(WORDS_BIGENDIAN) + /* All bigendian systems are fine, just ignore the swaps. */ + #define B2N_16(x) (void)(x) +@@ -53,6 +57,20 @@ + * FreeBSD and Solaris don't have <byteswap.h> or any other such + * functionality! + */ ++ ++#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 = ((((x) & 0xff00000000000000) >> 56) | \ ++ (((x) & 0x00ff000000000000) >> 40) | \ ++ (((x) & 0x0000ff0000000000) >> 24) | \ ++ (((x) & 0x000000ff00000000) >> 8) | \ ++ (((x) & 0x00000000ff000000) << 8) | \ ++ (((x) & 0x0000000000ff0000) << 24) | \ ++ (((x) & 0x000000000000ff00) << 40) | \ ++ (((x) & 0x00000000000000ff) << 56)) + + #elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) + #define B2N_16(x) \ |