diff options
author | lioux <lioux@FreeBSD.org> | 2004-11-14 11:54:44 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2004-11-14 11:54:44 +0800 |
commit | bddde3162384032a354a43e0f7ede03fce03f5ff (patch) | |
tree | 7275f688109a0b1e9f5dd4853a64ade1b235f1c7 /multimedia/libdvdread | |
parent | 9b8cf013612d6ec754d22b9a770257f01c89920d (diff) | |
download | freebsd-ports-gnome-bddde3162384032a354a43e0f7ede03fce03f5ff.tar.gz freebsd-ports-gnome-bddde3162384032a354a43e0f7ede03fce03f5ff.tar.zst freebsd-ports-gnome-bddde3162384032a354a43e0f7ede03fce03f5ff.zip |
Yet improve support for FreeBSD optimized byteswap routines
Diffstat (limited to 'multimedia/libdvdread')
-rw-r--r-- | multimedia/libdvdread/files/patch-dvdread::bswap.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/multimedia/libdvdread/files/patch-dvdread::bswap.h b/multimedia/libdvdread/files/patch-dvdread::bswap.h index 4bb3524c93dc..02bb51851df8 100644 --- a/multimedia/libdvdread/files/patch-dvdread::bswap.h +++ b/multimedia/libdvdread/files/patch-dvdread::bswap.h @@ -1,10 +1,12 @@ ---- dvdread/bswap.h.orig Wed Mar 5 23:13:17 2003 -+++ dvdread/bswap.h Wed Mar 5 23:14:24 2003 -@@ -57,7 +57,15 @@ +--- dvdread/bswap.h.orig Sat Nov 13 17:18:54 2004 ++++ dvdread/bswap.h Sat Nov 13 18:01:26 2004 +@@ -57,7 +57,19 @@ #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) ++# if __FreeBSD_version >= 510000 + #define B2N_64(x) x = be64toh(x) ++# else +#define B2N_64(x) x = \ + x = ((((x) & 0xff00000000000000) >> 56) | \ + (((x) & 0x00ff000000000000) >> 40) | \ @@ -14,6 +16,7 @@ + (((x) & 0x0000000000ff0000) << 24) | \ + (((x) & 0x000000000000ff00) << 40) | \ + (((x) & 0x00000000000000ff) << 56)) ++# endif /* This is a slow but portable implementation, it has multiple evaluation * problems so beware. |