summaryrefslogtreecommitdiff
path: root/src/input/libdvdnav
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-06-14 16:25:38 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-06-14 16:25:38 +0200
commit97049a8985f7f9cadff0d61d65961c5cfd490829 (patch)
tree32db874d5040bc0a42f20b5a9f5adc1712471373 /src/input/libdvdnav
parent7ae03d031828b8595ef6a441717b3b5402f6ce0d (diff)
parent9f35b93d3ee2a40444c538247cfc5b05b4b0bf89 (diff)
downloadxine-lib-97049a8985f7f9cadff0d61d65961c5cfd490829.tar.gz
xine-lib-97049a8985f7f9cadff0d61d65961c5cfd490829.tar.bz2
Merge from 1.1 branch.
Diffstat (limited to 'src/input/libdvdnav')
-rw-r--r--src/input/libdvdnav/bswap.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/input/libdvdnav/bswap.h b/src/input/libdvdnav/bswap.h
index 36543fba5..2a2d222fe 100644
--- a/src/input/libdvdnav/bswap.h
+++ b/src/input/libdvdnav/bswap.h
@@ -41,6 +41,12 @@
#define B2N_32(x) x = bswap_32(x)
#define B2N_64(x) x = bswap_64(x)
+#elif defined(__SVR4) && defined(__sun)
+#include <sys/byteorder.h>
+#define B2N_16(x) x = BSWAP_16(x)
+#define B2N_32(x) x = BSWAP_32(x)
+#define B2N_64(x) x = BSWAP_64(x)
+
#elif defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define B2N_16(x) x = OSSwapBigToHostInt16(x)
@@ -67,11 +73,11 @@
/* This is a slow but portable implementation, it has multiple evaluation
* problems so beware.
- * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such
+ * Old FreeBSD and Windows don't have <byteswap.h> or any other such
* functionality!
*/
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__)
+#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__)
#define B2N_16(x) \
x = ((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8))