os/ossrv/genericopenlibs/cstdlib/LINC/_ANSI.H
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LINC/_ANSI.H	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,81 @@
     1.4 +/*
     1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +* To get a strict ANSI C environment, define macro _STRICT_ANSI.  This will
    1.19 +* "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
    1.20 +* files aren't affected).
    1.21 +* 
    1.22 +*
    1.23 +*/
    1.24 +
    1.25 +
    1.26 +
    1.27 +/**
    1.28 + @file
    1.29 + @publishedAll
    1.30 + @released
    1.31 +*/
    1.32 +
    1.33 +#ifndef	_ANSIDECL_H_
    1.34 +#define	_ANSIDECL_H_
    1.35 +
    1.36 +/** 
    1.37 +Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler 
    1.38 +MSVC is however an environment which doesn't define __STDC__, so
    1.39 +we fix it up in here...
    1.40 +*/
    1.41 +
    1.42 +#ifndef __STDC__
    1.43 +#define __STDC__	1
    1.44 +#endif
    1.45 +
    1.46 +#define _STRICT_ANSI
    1.47 +
    1.48 +/**
    1.49 +From GCC 2.5 onwards it is possible to tell the compiler that functions
    1.50 +don't return, which would stop some warnings while building STDLIB
    1.51 +*/
    1.52 +#if 0
    1.53 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)
    1.54 +#else
    1.55 +#define _ATTRIBUTE(attrs)
    1.56 +#endif
    1.57 +
    1.58 +#ifndef EXPORT_C
    1.59 +/**
    1.60 +It is needed to annotate the functions which will be exported from the ESTLIB DLL,
    1.61 +but mustn't conflict with the definitions in <e32std.h>
    1.62 +*/
    1.63 +#ifdef __VC32__
    1.64 +#define IMPORT_C __declspec(dllexport)
    1.65 +#define EXPORT_C __declspec(dllexport)
    1.66 +#endif
    1.67 +
    1.68 +#ifdef __CW32__
    1.69 +#define IMPORT_C __declspec(dllexport)
    1.70 +#define EXPORT_C __declspec(dllexport)
    1.71 +#endif
    1.72 +
    1.73 +#ifdef __GCC32__
    1.74 +#define IMPORT_C
    1.75 +#define EXPORT_C __declspec(dllexport)
    1.76 +#endif
    1.77 +
    1.78 +#ifdef __GCCE__
    1.79 +#define IMPORT_C __declspec(dllimport) 
    1.80 +#define EXPORT_C __declspec(dllexport)
    1.81 +#endif
    1.82 +
    1.83 +#endif /* EXPORT_C */
    1.84 +#endif /* _ANSIDECL_H_ */