epoc32/include/stdapis/_ansi.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 * To get a strict ANSI C environment, define macro _STRICT_ANSI.  This will
    16 * "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
    17 * files aren't affected).
    18 * 
    19 *
    20 */
    21 
    22 
    23 
    24 #ifndef	_ANSIDECL_H_
    25 #define	_ANSIDECL_H_
    26 
    27 /** 
    28 Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler 
    29 MSVC is however an environment which doesn't define __STDC__, so
    30 we fix it up in here...
    31 */
    32 
    33 #ifndef __STDC__
    34 #define __STDC__	1
    35 #endif
    36 
    37 #define _STRICT_ANSI
    38 
    39 /**
    40 From GCC 2.5 onwards it is possible to tell the compiler that functions
    41 don't return, which would stop some warnings while building STDLIB
    42 */
    43 #if 0
    44 #define _ATTRIBUTE(attrs) __attribute__ (attrs)
    45 #else
    46 #define _ATTRIBUTE(attrs)
    47 #endif
    48 
    49 /*
    50 
    51 */
    52  
    53 #ifndef EXPORT_C
    54 /**
    55 It is needed to annotate the functions which will be exported from the ESTLIB DLL,
    56 but mustn't conflict with the definitions in <e32std.h>
    57 */
    58 #ifdef __VC32__
    59 #define IMPORT_C __declspec(dllexport)
    60 #define EXPORT_C __declspec(dllexport)
    61 #endif
    62 
    63 #ifdef __CW32__
    64 #define IMPORT_C __declspec(dllexport)
    65 #define EXPORT_C __declspec(dllexport)
    66 #endif
    67 
    68 #ifdef __GCC32__
    69 #define IMPORT_C
    70 #define EXPORT_C __declspec(dllexport)
    71 #endif
    72 
    73 #ifdef __SYMBIAN32__
    74 #ifdef __cplusplus
    75 #include <e32def.h>
    76 #endif
    77 #else
    78 #define IMPORT_C
    79 #define EXPORT_C
    80 #endif
    81 
    82 #endif /* EXPORT_C */
    83 #endif /* _ANSIDECL_H_ */