os/ossrv/genericopenlibs/openenvcore/include/_ansi.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:
sl@0
    15
* To get a strict ANSI C environment, define macro _STRICT_ANSI.  This will
sl@0
    16
* "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
sl@0
    17
* files aren't affected).
sl@0
    18
* 
sl@0
    19
*
sl@0
    20
*/
sl@0
    21
sl@0
    22
sl@0
    23
sl@0
    24
#ifndef	_ANSIDECL_H_
sl@0
    25
#define	_ANSIDECL_H_
sl@0
    26
sl@0
    27
/** 
sl@0
    28
Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler 
sl@0
    29
MSVC is however an environment which doesn't define __STDC__, so
sl@0
    30
we fix it up in here...
sl@0
    31
*/
sl@0
    32
sl@0
    33
#ifndef __STDC__
sl@0
    34
#define __STDC__	1
sl@0
    35
#endif
sl@0
    36
sl@0
    37
#define _STRICT_ANSI
sl@0
    38
sl@0
    39
/**
sl@0
    40
From GCC 2.5 onwards it is possible to tell the compiler that functions
sl@0
    41
don't return, which would stop some warnings while building STDLIB
sl@0
    42
*/
sl@0
    43
#if 0
sl@0
    44
#define _ATTRIBUTE(attrs) __attribute__ (attrs)
sl@0
    45
#else
sl@0
    46
#define _ATTRIBUTE(attrs)
sl@0
    47
#endif
sl@0
    48
sl@0
    49
/*
sl@0
    50
sl@0
    51
*/
sl@0
    52
 
sl@0
    53
#ifndef EXPORT_C
sl@0
    54
/**
sl@0
    55
It is needed to annotate the functions which will be exported from the ESTLIB DLL,
sl@0
    56
but mustn't conflict with the definitions in <e32std.h>
sl@0
    57
*/
sl@0
    58
#ifdef __VC32__
sl@0
    59
#define IMPORT_C __declspec(dllexport)
sl@0
    60
#define EXPORT_C __declspec(dllexport)
sl@0
    61
#endif
sl@0
    62
sl@0
    63
#ifdef __CW32__
sl@0
    64
#define IMPORT_C __declspec(dllexport)
sl@0
    65
#define EXPORT_C __declspec(dllexport)
sl@0
    66
#endif
sl@0
    67
sl@0
    68
#ifdef __GCC32__
sl@0
    69
#define IMPORT_C
sl@0
    70
#define EXPORT_C __declspec(dllexport)
sl@0
    71
#endif
sl@0
    72
sl@0
    73
#ifdef __SYMBIAN32__
sl@0
    74
#ifdef __cplusplus
sl@0
    75
#include <e32def.h>
sl@0
    76
#endif
sl@0
    77
#else
sl@0
    78
#define IMPORT_C
sl@0
    79
#define EXPORT_C
sl@0
    80
#endif
sl@0
    81
sl@0
    82
#endif /* EXPORT_C */
sl@0
    83
#endif /* _ANSIDECL_H_ */