aboutsummaryrefslogtreecommitdiff
path: root/cad/magic
diff options
context:
space:
mode:
authorOliver Lehmann <oliver@FreeBSD.org>2004-01-31 12:17:14 +0000
committerOliver Lehmann <oliver@FreeBSD.org>2004-01-31 12:17:14 +0000
commitedf4887b7bef0e808f2c146ed76f35e5ebec4a7e (patch)
tree87c8d26e9d17616c4bb846c5b068e2eb78349b15 /cad/magic
parent6abdfa6dbbf572291fbb4146bd100c06c71a9cfd (diff)
downloadports-edf4887b7bef0e808f2c146ed76f35e5ebec4a7e.tar.gz
ports-edf4887b7bef0e808f2c146ed76f35e5ebec4a7e.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
Notes
Notes: svn path=/head/; revision=99598
Diffstat (limited to 'cad/magic')
-rw-r--r--cad/magic/files/patch-misc::magic.h27
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