First public contribution.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
26 #ifndef __IEEE_BIG_ENDIAN
27 #ifndef __IEEE_LITTLE_ENDIAN
30 EPOC safety net - Check various EPOC defines to ensure that
31 we get an appropriate endianness choice
33 #if (defined(__WINS__) || defined(__MX86__) || defined(__X86GCC__)) && !defined(__i386__)
35 #elif defined(__MARM__) && !defined(__arm__)
42 EABI supports the VFP specification, where the ordering of the words
43 matches the endianness.
45 #define __IEEE_LITTLE_ENDIAN
48 Pre-VFP, ARM used the big endian ordering of the words, regardless of
51 #define __IEEE_BIG_ENDIAN
57 #define __IEEE_BIG_ENDIAN
62 #define __IEEE_BIG_ENDIAN
65 #if defined(__m68k__) || defined(__mc68000__)
67 #define __IEEE_BIG_ENDIAN
70 #if defined (__H8300__) || defined (__H8300H__)
72 #define __IEEE_BIG_ENDIAN
73 #define __SMALL_BITFIELDS
74 #define _DOUBLE_IS_32BITS
79 #define __IEEE_BIG_ENDIAN
80 #define __SMALL_BITFIELDS
81 #define _DOUBLE_IS_32BITS
85 #ifdef __LITTLE_ENDIAN__
87 #define __IEEE_LITTLE_ENDIAN
89 #define __IEEE_BIG_ENDIAN
93 #define _DOUBLE_IS_32BITS
99 #define __IEEE_BIG_ENDIAN
102 /* Added "&& !defined(__arm__)" to avoid the duplicate definition of the
103 __ieee_[float|double]_shape_type structures in stdlib\LINC\IEEEFP.h
104 conditionally compiled using the __IEEE_LITTLE_ENDIAN && __IEEE_BIG_ENDIAN
105 in GCCXML builds. This is a work around as we can't get gccxml to stop
106 defining __i386__ as it's defined in the "<built-in>" header file of the
109 #if defined(__i386__) && !defined(__arm__)
111 #define __IEEE_LITTLE_ENDIAN
116 #define __IEEE_LITTLE_ENDIAN
121 #define __IEEE_LITTLE_ENDIAN
125 #define __IEEE_BIG_ENDIAN
129 necv70 was __IEEE_LITTLE_ENDIAN.
134 #define __IEEE_LITTLE_ENDIAN
135 #define __SMALL_BITFIELDS
136 #define _DOUBLE_IS_32BITS
139 #if defined(__Z8001__) || defined(__Z8002__)
141 #define __IEEE_BIG_ENDIAN
146 #define __IEEE_BIG_ENDIAN
151 #define __IEEE_LITTLE_ENDIAN
157 #define __IEEE_BIG_ENDIAN
160 #define __IEEE_LITTLE_ENDIAN
166 #define __IEEE_LITTLE_ENDIAN /* always little-endian M*Core for EPOC */
169 #ifndef __IEEE_BIG_ENDIAN
170 #ifndef __IEEE_LITTLE_ENDIAN
171 #error Endianess not declared!!
172 #endif /* not __IEEE_LITTLE_ENDIAN */
173 #endif /* not __IEEE_BIG_ENDIAN */
175 #endif /* not __IEEE_LITTLE_ENDIAN */
176 #endif /* not __IEEE_BIG_ENDIAN */