epoc32/include/libc/_ansi.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 _ansi.h
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 
       
    25 
       
    26 
       
    27 
       
    28 /**
       
    29  @file
       
    30  @publishedAll
       
    31  @released
       
    32 */
       
    33 
       
    34 #ifndef	_ANSIDECL_H_
       
    35 #define	_ANSIDECL_H_
       
    36 
       
    37 /** 
       
    38 Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler 
       
    39 MSVC is however an environment which doesn't define __STDC__, so
       
    40 we fix it up in here...
       
    41 */
       
    42 
       
    43 #ifndef __STDC__
       
    44 #define __STDC__	1
       
    45 #endif
       
    46 
       
    47 #define _STRICT_ANSI
       
    48 
       
    49 /**
       
    50 From GCC 2.5 onwards it is possible to tell the compiler that functions
       
    51 don't return, which would stop some warnings while building STDLIB
       
    52 */
       
    53 #if 0
       
    54 #define _ATTRIBUTE(attrs) __attribute__ (attrs)
       
    55 #else
       
    56 #define _ATTRIBUTE(attrs)
       
    57 #endif
       
    58 
       
    59 #ifndef EXPORT_C
       
    60 /**
       
    61 It is needed to annotate the functions which will be exported from the ESTLIB DLL,
       
    62 but mustn't conflict with the definitions in <e32std.h>
       
    63 */
       
    64 #ifdef __VC32__
       
    65 #define IMPORT_C __declspec(dllexport)
       
    66 #define EXPORT_C __declspec(dllexport)
       
    67 #endif
       
    68 
       
    69 #ifdef __CW32__
       
    70 #define IMPORT_C __declspec(dllexport)
       
    71 #define EXPORT_C __declspec(dllexport)
       
    72 #endif
       
    73 
       
    74 #ifdef __GCC32__
       
    75 #define IMPORT_C
       
    76 #define EXPORT_C __declspec(dllexport)
       
    77 #endif
       
    78 
       
    79 #ifdef __GCCE__
       
    80 #define IMPORT_C __declspec(dllimport) 
       
    81 #define EXPORT_C __declspec(dllexport)
       
    82 #endif
       
    83 
       
    84 #endif /* EXPORT_C */
       
    85 #endif /* _ANSIDECL_H_ */