]>
Commit | Line | Data |
---|---|---|
91447636 A |
1 | /* |
2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | ||
1c79356b A |
23 | /* |
24 | * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved. | |
9bccf70c | 25 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. |
1c79356b A |
26 | * |
27 | * @APPLE_LICENSE_HEADER_START@ | |
28 | * | |
e5568f75 A |
29 | * The contents of this file constitute Original Code as defined in and |
30 | * are subject to the Apple Public Source License Version 1.1 (the | |
31 | * "License"). You may not use this file except in compliance with the | |
32 | * License. Please obtain a copy of the License at | |
33 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 34 | * |
e5568f75 A |
35 | * This Original Code and all software distributed under the License are |
36 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
37 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
38 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
e5568f75 A |
39 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
40 | * License for the specific language governing rights and limitations | |
41 | * under the License. | |
1c79356b A |
42 | * |
43 | * @APPLE_LICENSE_HEADER_END@ | |
44 | */ | |
45 | /* | |
46 | * Copyright (c) 1987, 1991, 1993 | |
47 | * The Regents of the University of California. All rights reserved. | |
48 | * | |
49 | * Redistribution and use in source and binary forms, with or without | |
50 | * modification, are permitted provided that the following conditions | |
51 | * are met: | |
52 | * 1. Redistributions of source code must retain the above copyright | |
53 | * notice, this list of conditions and the following disclaimer. | |
54 | * 2. Redistributions in binary form must reproduce the above copyright | |
55 | * notice, this list of conditions and the following disclaimer in the | |
56 | * documentation and/or other materials provided with the distribution. | |
57 | * 3. All advertising materials mentioning features or use of this software | |
58 | * must display the following acknowledgement: | |
59 | * This product includes software developed by the University of | |
60 | * California, Berkeley and its contributors. | |
61 | * 4. Neither the name of the University nor the names of its contributors | |
62 | * may be used to endorse or promote products derived from this software | |
63 | * without specific prior written permission. | |
64 | * | |
65 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
66 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
67 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
68 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
69 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
70 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
71 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
72 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
73 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
74 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
75 | * SUCH DAMAGE. | |
76 | * | |
77 | * @(#)endian.h 8.1 (Berkeley) 6/10/93 | |
78 | */ | |
79 | ||
80 | #ifndef _PPC_ENDIAN_H_ | |
81 | #define _PPC_ENDIAN_H_ | |
82 | ||
83 | /* | |
84 | * Define the order of 32-bit words in 64-bit words. | |
85 | */ | |
86 | #define _QUAD_HIGHWORD 0 | |
87 | #define _QUAD_LOWWORD 1 | |
88 | ||
1c79356b A |
89 | /* |
90 | * Definitions for byte order, according to byte significance from low | |
91 | * address to high. | |
92 | */ | |
91447636 A |
93 | #define __DARWIN_LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ |
94 | #define __DARWIN_BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net, ppc */ | |
95 | #define __DARWIN_PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ | |
1c79356b | 96 | |
91447636 | 97 | #define __DARWIN_BYTE_ORDER __DARWIN_BIG_ENDIAN |
1c79356b | 98 | |
91447636 | 99 | #if defined(KERNEL) || !defined(_POSIX_C_SOURCE) |
1c79356b | 100 | |
91447636 A |
101 | #define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN |
102 | #define BIG_ENDIAN __DARWIN_BIG_ENDIAN | |
103 | #define PDP_ENDIAN __DARWIN_PDP_ENDIAN | |
1c79356b | 104 | |
91447636 | 105 | #define BYTE_ORDER __DARWIN_BYTE_ORDER |
1c79356b | 106 | |
91447636 | 107 | #include <sys/_endian.h> |
1c79356b | 108 | |
91447636 | 109 | #endif /* defined(KERNEL) || !defined(_POSIX_C_SOURCE) */ |
1c79356b | 110 | #endif /* !_PPC_ENDIAN_H_ */ |