sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedAll sl@0: @released sl@0: */ sl@0: sl@0: #ifndef __IEEE_BIG_ENDIAN sl@0: #ifndef __IEEE_LITTLE_ENDIAN sl@0: sl@0: /** sl@0: EPOC safety net - Check various EPOC defines to ensure that sl@0: we get an appropriate endianness choice sl@0: */ sl@0: #if (defined(__WINS__) || defined(__MX86__) || defined(__X86GCC__)) && !defined(__i386__) sl@0: #define __i386__ sl@0: #elif defined(__MARM__) && !defined(__arm__) sl@0: #define __arm__ sl@0: #endif sl@0: sl@0: #ifdef __arm__ sl@0: #ifdef __EABI__ sl@0: /** sl@0: EABI supports the VFP specification, where the ordering of the words sl@0: matches the endianness. sl@0: */ sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #else sl@0: /** sl@0: Pre-VFP, ARM used the big endian ordering of the words, regardless of sl@0: the endianess. sl@0: */ sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: #endif sl@0: sl@0: #ifdef __hppa__ sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __sparc__ sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: #if defined(__m68k__) || defined(__mc68000__) sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: #if defined (__H8300__) || defined (__H8300H__) sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #define __SMALL_BITFIELDS sl@0: #define _DOUBLE_IS_32BITS sl@0: #endif sl@0: sl@0: #ifdef __H8500__ sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #define __SMALL_BITFIELDS sl@0: #define _DOUBLE_IS_32BITS sl@0: #endif sl@0: sl@0: #ifdef __sh__ sl@0: #ifdef __LITTLE_ENDIAN__ sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #else sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: #ifdef __SH3E__ sl@0: sl@0: #define _DOUBLE_IS_32BITS sl@0: #endif sl@0: #endif sl@0: sl@0: #ifdef _AM29K sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: /* Added "&& !defined(__arm__)" to avoid the duplicate definition of the sl@0: __ieee_[float|double]_shape_type structures in stdlib\LINC\IEEEFP.h sl@0: conditionally compiled using the __IEEE_LITTLE_ENDIAN && __IEEE_BIG_ENDIAN sl@0: in GCCXML builds. This is a work around as we can't get gccxml to stop sl@0: defining __i386__ as it's defined in the "" header file of the sl@0: compiler. sl@0: */ sl@0: #if defined(__i386__) && !defined(__arm__) sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __i960__ sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __MIPSEL__ sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #endif sl@0: #ifdef __MIPSEB__ sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: /** sl@0: necv70 was __IEEE_LITTLE_ENDIAN. sl@0: */ sl@0: sl@0: #ifdef __W65__ sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #define __SMALL_BITFIELDS sl@0: #define _DOUBLE_IS_32BITS sl@0: #endif sl@0: sl@0: #if defined(__Z8001__) || defined(__Z8002__) sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __m88k__ sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __v800 sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #endif sl@0: sl@0: #ifdef __PPC__ sl@0: #ifdef _BIG_ENDIAN sl@0: sl@0: #define __IEEE_BIG_ENDIAN sl@0: #else sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN sl@0: #endif sl@0: #endif sl@0: sl@0: #ifdef __mcore__ sl@0: sl@0: #define __IEEE_LITTLE_ENDIAN /* always little-endian M*Core for EPOC */ sl@0: #endif sl@0: sl@0: #ifndef __IEEE_BIG_ENDIAN sl@0: #ifndef __IEEE_LITTLE_ENDIAN sl@0: #error Endianess not declared!! sl@0: #endif /* not __IEEE_LITTLE_ENDIAN */ sl@0: #endif /* not __IEEE_BIG_ENDIAN */ sl@0: sl@0: #endif /* not __IEEE_LITTLE_ENDIAN */ sl@0: #endif /* not __IEEE_BIG_ENDIAN */ sl@0: