blob: 67417c664ff178a713bc6096c14e6cbd322599e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
$NetBSD: patch-aa,v 1.1.1.1 2002/04/06 21:37:29 dmcmahill Exp $
--- misc/magic.h.orig Fri Sep 21 11:15:45 2001
+++ misc/magic.h Wed Mar 13 12:37:46 2002
@@ -147,69 +147,11 @@
*/
-#ifdef i386
-#define IS_LITTLE_ENDIAN /* Intel x86 processors. */
+#include <sys/endian.h>
+#if BYTE_ORDER==BIG_ENDIAN
+#define IS_BIG_ENDIAN
+#else
+#define IS_LITTLE_ENDIAN
#endif
-#ifdef linux
-#define IS_LITTLE_ENDIAN /* Intel x86 processors running Linux >=.99p7. */
-#endif
-
-#ifdef vax
-#define IS_LITTLE_ENDIAN /* The good 'ol VAX. */
-#endif
-
-#ifdef MIPSEL
-#define IS_LITTLE_ENDIAN /* MIPS processors in little-endian mode. */
-#endif
-
-#ifdef wrltitan
-#define IS_LITTLE_ENDIAN /* A DEC-WRL titan research machine (only 20 exist). */
- /* NOT intended for the Ardent titan machine. */
-#endif
-
-#ifdef MIPSEB
-#define IS_BIG_ENDIAN /* MIPS processors in big-endian mode. */
-#endif
-
-#ifdef mc68000
-#define IS_BIG_ENDIAN /* All 68xxx machines, such as Sun2's and Sun3's. */
-#endif
-
-#ifdef macII
-#define IS_BIG_ENDIAN /* Apple MacII (also a 68000, but being safe here.) */
-#endif
-
-#ifdef sparc
-#define IS_BIG_ENDIAN /* All SPARC-based machines. */
-#endif
-
-#ifdef ibm032
-#define IS_BIG_ENDIAN /* IBM PC-RT and related machines. */
-#endif
-
-#ifdef hp9000s300
-#define IS_BIG_ENDIAN /* HP 9000 machine. */
-#endif
-
-#ifdef hp9000s800
-#define IS_BIG_ENDIAN /* HP 9000 machine. */
-#endif
-
-#ifdef hp9000s820
-#define IS_BIG_ENDIAN /* HP 9000 machine. */
-#endif
-
-#ifdef ALPHA
-#define IS_LITTLE_ENDIAN /* Digital Alpha AXP */
-#endif
-
-/* Well, how'd we do? */
-
-#if !defined(IS_BIG_ENDIAN) && !defined(IS_LITTLE_ENDIAN)
- You_need_to_define_IS_LITTLE_ENDIAN_or_IS_BIG_ENDIAN_for_your_machine.
-#endif
-#if defined(IS_BIG_ENDIAN) && defined(IS_LITTLE_ENDIAN)
- You_should_not_define_both_IS_LITTLE_ENDIAN_and_IS_BIG_ENDIAN.
-#endif
/* ------- Configuration: Handle Missing Routines/Definitions ------- */
|