diff options
author | oliver <oliver@FreeBSD.org> | 2004-01-31 20:17:14 +0800 |
---|---|---|
committer | oliver <oliver@FreeBSD.org> | 2004-01-31 20:17:14 +0800 |
commit | e4f8ec2c792590ed9d5c86ea6055e9a14cf10472 (patch) | |
tree | 6d58e67a83cd4535d63bc6feeb1741288d8aed71 /cad/magic | |
parent | 5b5eb76e800c5fff72a31472ac144a0c0bab41c0 (diff) | |
download | freebsd-ports-gnome-e4f8ec2c792590ed9d5c86ea6055e9a14cf10472.tar.gz freebsd-ports-gnome-e4f8ec2c792590ed9d5c86ea6055e9a14cf10472.tar.zst freebsd-ports-gnome-e4f8ec2c792590ed9d5c86ea6055e9a14cf10472.zip |
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
Diffstat (limited to 'cad/magic')
-rw-r--r-- | cad/magic/files/patch-misc::magic.h | 27 |
1 files changed, 20 insertions, 7 deletions
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 <machine/endian.h> ++ + #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 |