From c21213a03b4cba2d66c2825b084af79ba432c580 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 5 Apr 2004 18:03:55 +0000 Subject: [PATCH] Fix for compilation on Windows. --- avilib-0.6.10/avidump.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/avilib-0.6.10/avidump.c b/avilib-0.6.10/avidump.c index 9d9eccef6..320fc4aa2 100644 --- a/avilib-0.6.10/avidump.c +++ b/avilib-0.6.10/avidump.c @@ -44,11 +44,10 @@ #endif //#define AVI_DEBUG - #ifdef HAVE_ENDIAN_H # include #endif -#if BYTE_ORDER == BIG_ENDIAN +#if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN) # define SWAP2(x) (((x>>8) & 0x00ff) |\ ((x<<8) & 0xff00)) @@ -75,7 +74,7 @@ typedef unsigned char boolean; /* Macro to convert expressions of form 'F','O','U','R' to numbers of type FOURCC: */ -#if BYTE_ORDER == BIG_ENDIAN +#if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN) # define MAKEFOURCC(a,b,c,d) ((((DWORD)a)<<24) | (((DWORD)b)<<16) | \ (((DWORD)c)<< 8) | ( (DWORD)d) ) #else @@ -115,7 +114,7 @@ typedef unsigned char boolean; static void FOURCC2Str(FOURCC fcc, char* s) { -#if BYTE_ORDER == BIG_ENDIAN +#if defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN) s[0]=(fcc >> 24) & 0xFF; s[1]=(fcc >> 16) & 0xFF; s[2]=(fcc >> 8) & 0xFF;