sl@0: // Copyright (c) 2007-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 the License "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: // e32\include\gcc.h sl@0: // This is a preinclude file for GCC compilers. Currently only tested with GCC 3.4.4. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalAll sl@0: */ sl@0: sl@0: // Check this header is being used as anticipated sl@0: #ifndef __GCC32__ sl@0: #error Unexpected include of GCC header sl@0: #endif sl@0: #ifndef __X86__ sl@0: #error GCC header untested on non-X86 platforms sl@0: #endif sl@0: sl@0: // Do product include if not done already sl@0: #ifdef PRODUCT_INCLUDE sl@0: #include PRODUCT_INCLUDE sl@0: #endif sl@0: sl@0: // Visibility sl@0: #define IMPORT_C sl@0: #define IMPORT_D __attribute__((dllimport)) sl@0: #define EXPORT_C __attribute__((dllexport)) sl@0: #define EXPORT_D sl@0: #ifdef GCC4_OR_LATER // this would be nice... use in conjunction with -fvisibility=hidden sl@0: #undef EXPORT_C sl@0: #define EXPORT_C __attribute__((visibility("default"))) sl@0: #endif sl@0: sl@0: // Varargs sl@0: typedef __builtin_va_list va_list; sl@0: #define va_start(v, l) __builtin_va_start(v, l) sl@0: #define va_arg(v, l) __builtin_va_arg(v, l) sl@0: #define va_end(v) __builtin_va_end(v) sl@0: #define VA_LIST va_list sl@0: #define _VA_LIST_DEFINED //To deal with stdarg.h sl@0: #define __VA_LIST_defined //To deal with e32def.h sl@0: #define VA_START(ap,pn) va_start(ap, pn) sl@0: #define VA_ARG(ap,type) va_arg(ap,type) sl@0: #define VA_END(ap) va_end(ap) sl@0: sl@0: // Stdlib/OpenEnv support sl@0: // This should prevent /stdlib/linc/stdarg.h from doing damage. sl@0: #define _STDARG_H sl@0: // now deal with stdarg_e.h sl@0: typedef va_list __e32_va_list; sl@0: #define _STDARG_E_H sl@0: // wchar_t is a primtive type for C++ on GCC sl@0: #ifdef __cplusplus sl@0: #define __wchar_t_defined sl@0: #endif sl@0: sl@0: // General sl@0: #define __NO_CLASS_CONSTS__ sl@0: #define I64LIT(x) x##LL sl@0: #define UI64LIT(x) x##ULL sl@0: #define __SOFTFP sl@0: #define __NORETURN__ __attribute__ ((noreturn)) sl@0: #define NONSHARABLE_CLASS(x) class /*__attribute__(notshared)*/ x sl@0: #define NONSHARABLE_STRUCT(x) struct /*__attribute__(notshared)*/ x sl@0: #define __NO_THROW //throw () sl@0: #define __THROW(t) //throw (t) sl@0: #define TEMPLATE_SPECIALIZATION template<> sl@0: sl@0: #ifndef __cdecl sl@0: #define __cdecl __attribute__((cdecl)) sl@0: #endif sl@0: #ifndef __fastcall sl@0: #define __fastcall __attribute__((fastcall)) sl@0: #endif sl@0: #ifndef __stdcall sl@0: #define __stdcall __attribute__((stdcall)) sl@0: #endif sl@0: sl@0: // These are built-in defines during compilation stage but are also required (and not defined) during makmake stage sl@0: #ifndef __GNUC__ sl@0: #define __GNUC__ 3 sl@0: #endif sl@0: sl@0: #ifndef __i386 sl@0: #define __i386 sl@0: #endif sl@0: