diff options
author | Albert Lee <trisk+xine@acm.jhu.edu> | 2007-06-13 23:30:55 +0200 |
---|---|---|
committer | Albert Lee <trisk+xine@acm.jhu.edu> | 2007-06-13 23:30:55 +0200 |
commit | 65f317b69e4091b4a228e1921755152911c2065c (patch) | |
tree | 28ad3247a42c35662c326d72a59c5682f9bed43c /src | |
parent | 86f8ad6c47e917e6ed79e3783f8572975b7fdf9e (diff) | |
download | xine-lib-65f317b69e4091b4a228e1921755152911c2065c.tar.gz xine-lib-65f317b69e4091b4a228e1921755152911c2065c.tar.bz2 |
Support Solaris byteorder.h macros.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/libdvdnav/bswap.h | 10 |
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)) |