From 65f317b69e4091b4a228e1921755152911c2065c Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Wed, 13 Jun 2007 23:30:55 +0200 Subject: Support Solaris byteorder.h macros. --- src/input/libdvdnav/bswap.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') 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 +#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 #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 or any other such + * Old FreeBSD and Windows don't have 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)) -- cgit v1.2.3