epoc32/include/gcce/gcce.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/gcce/gcce.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/gcce/gcce.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of the License "ARM EABI LICENCE.txt"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// in kernel/eka/compsupp.
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -17,8 +17,6 @@
    1.16  // 
    1.17  //
    1.18  
    1.19 -
    1.20 -
    1.21  /**
    1.22   @file
    1.23   @publishedAll
    1.24 @@ -30,12 +28,17 @@
    1.25  #endif
    1.26  
    1.27  // stuff from e32def.h
    1.28 +
    1.29  #define __NO_CLASS_CONSTS__
    1.30  #define __NORETURN__ __declspec(noreturn)
    1.31  #define __NORETURN_TERMINATOR()
    1.32 +
    1.33  #define IMPORT_C __declspec(dllimport) 
    1.34  #define EXPORT_C __declspec(dllexport)
    1.35  
    1.36 +#define IMPORT_D __declspec(dllimport) 
    1.37 +#define EXPORT_D __declspec(dllexport)
    1.38 +
    1.39  
    1.40  
    1.41  
    1.42 @@ -92,8 +95,9 @@
    1.43  #define __TText_defined
    1.44  
    1.45  // __NAKED__ from cpudefs.h
    1.46 -#define __NAKED__ __asm
    1.47 -#define ____ONLY_USE_NAKED_IN_CIA____ __asm
    1.48 +#define __NAKED__ __declspec(naked)
    1.49 +#define ____ONLY_USE_NAKED_IN_CIA____ __declspec(naked)
    1.50 +#define __WEAK__  __attribute__((weak))
    1.51  
    1.52  // Int64 and Uint64 from nkern\nklib.h
    1.53  typedef long long Int64;
    1.54 @@ -103,24 +107,29 @@
    1.55  // These should be used by e.g. stdlib
    1.56  
    1.57  #ifdef __cplusplus
    1.58 -    namespace std {
    1.59 -        extern "C" {
    1.60 -#endif  /* __cplusplus */
    1.61 +    namespace std { extern "C" {
    1.62 +#endif
    1.63  
    1.64 -typedef struct __va_list { void *__ap; } va_list;
    1.65 -
    1.66 +    #if __GNUC__ < 4
    1.67 +    typedef struct __va_list { void *__ap; } va_list;
    1.68 +    #else
    1.69 +    typedef __builtin_va_list va_list;
    1.70 +    #endif
    1.71  
    1.72  #ifdef __cplusplus
    1.73 -	}  /* extern "C" */
    1.74 -    }  /* namespace std */
    1.75 -
    1.76 +	} }
    1.77      using ::std::va_list;
    1.78  #endif
    1.79  
    1.80 +#if __GNUC__ < 4
    1.81  #define va_start(ap, parmN) __builtin_va_start(ap.__ap, parmN)
    1.82 -#define va_arg(ap, type) __builtin_va_arg(ap.__ap, type)
    1.83 -#define va_end(ap) __builtin_va_end(ap.__ap)
    1.84 -
    1.85 +#define va_arg(ap, type)    __builtin_va_arg(ap.__ap, type)
    1.86 +#define va_end(ap)          __builtin_va_end(ap.__ap)
    1.87 +#else
    1.88 +#define va_start(ap, parmN) __builtin_va_start(ap, parmN)
    1.89 +#define va_arg(ap, type)    __builtin_va_arg(ap, type)
    1.90 +#define va_end(ap)          __builtin_va_end(ap)
    1.91 +#endif
    1.92  
    1.93  #define VA_LIST va_list
    1.94  #define _VA_LIST_DEFINED //To deal with stdarg.h
    1.95 @@ -151,8 +160,9 @@
    1.96  
    1.97  //#define __EARLY_DEBUG__
    1.98  
    1.99 -// Deal with operator new issues here
   1.100 -#include "../symcpp.h"
   1.101 +#ifndef __SYMBIAN_STDCPP_SUPPORT__
   1.102 +	#include <symcpp.h>
   1.103 +#endif
   1.104  
   1.105  #ifdef __cplusplus
   1.106  // Support for throwing exceptions through embedded assembler
   1.107 @@ -163,3 +173,4 @@
   1.108  #define __EH_FRAME_SAVE1(reg,offset) FRAME SAVE {reg}, offset
   1.109  
   1.110  #endif
   1.111 +