From e4f8ec2c792590ed9d5c86ea6055e9a14cf10472 Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 31 Jan 2004 12:17:14 +0000 Subject: magic.h wasn't able to determine LITTLE_ENDIAN xor BIG_ENDIAN for amd64. include endian.h now and retrive that information directly from BYTE_ORDER Noted By: bento via kris --- cad/magic/files/patch-misc::magic.h | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'cad/magic') diff --git a/cad/magic/files/patch-misc::magic.h b/cad/magic/files/patch-misc::magic.h index b3b26607e64c..85d969d4dac1 100644 --- a/cad/magic/files/patch-misc::magic.h +++ b/cad/magic/files/patch-misc::magic.h @@ -1,15 +1,28 @@ ---- misc/magic.h.orig Sat Sep 22 00:15:45 2001 -+++ misc/magic.h Fri Oct 11 23:38:53 2002 -@@ -146,7 +146,7 @@ +--- misc/magic.h.orig Fri Sep 21 17:15:45 2001 ++++ misc/magic.h Sat Jan 31 13:07:11 2004 +@@ -18,6 +18,8 @@ + * rcsid="$Header" + */ + ++#include ++ + #define _MAGIC + + /* Note: System files, such as "stdio.h" and "sys/types.h", should be +@@ -146,6 +148,12 @@ * */ --#ifdef i386 -+#if defined(i386) || (defined(__alpha__) && defined(__FreeBSD__)) ++#if BYTE_ORDER == LITTLE_ENDIAN ++#define IS_LITTLE_ENDIAN ++#elif BYTE_ORDER == BIG_ENDIAN ++#define IS_BIG_ENDIAN ++#endif ++ + #ifdef i386 #define IS_LITTLE_ENDIAN /* Intel x86 processors. */ #endif - -@@ -224,7 +224,7 @@ +@@ -224,7 +232,7 @@ #if defined(sun) && !defined(sparc) # define NEED_MONCNTL #endif -- cgit