diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-01-06 20:38:11 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-01-06 20:38:11 +0000 |
commit | d36a1b8333081dcaad2b77209913253a9703d88f (patch) | |
tree | 0206a57064c0195407856e688d6a8744f9763746 /src | |
parent | c5678ae4000b8ea29e59dd3d51a90c847aa9d636 (diff) |
use __BYTE_ORDER macro for detecting byte order, as suggested on http://unixpapa.com/incnote/byteorder.html
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2098 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r-- | src/pulse/sample.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pulse/sample.h b/src/pulse/sample.h index 8f9f1733..f0b839fd 100644 --- a/src/pulse/sample.h +++ b/src/pulse/sample.h @@ -27,6 +27,7 @@ #include <inttypes.h> #include <sys/types.h> +#include <sys/param.h> #include <math.h> #include <pulse/cdecl.h> @@ -104,6 +105,14 @@ PA_C_DECL_BEGIN +#if !defined(WORDS_BIGENDIAN) +#if defined(__BYTE_ORDER) +#if __BYTE_ORDER == __BIG_ENDIAN +#define WORDS_BIGENDIAN +#endif +#endif +#endif + /** Maximum number of allowed channels */ #define PA_CHANNELS_MAX 32 |