1.1 --- a/epoc32/include/libc/_ansi.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/libc/_ansi.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,85 @@
1.4 -_ansi.h
1.5 +/*
1.6 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* To get a strict ANSI C environment, define macro _STRICT_ANSI. This will
1.20 +* "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
1.21 +* files aren't affected).
1.22 +*
1.23 +*
1.24 +*/
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +
1.31 +
1.32 +/**
1.33 + @file
1.34 + @publishedAll
1.35 + @released
1.36 +*/
1.37 +
1.38 +#ifndef _ANSIDECL_H_
1.39 +#define _ANSIDECL_H_
1.40 +
1.41 +/**
1.42 +Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler
1.43 +MSVC is however an environment which doesn't define __STDC__, so
1.44 +we fix it up in here...
1.45 +*/
1.46 +
1.47 +#ifndef __STDC__
1.48 +#define __STDC__ 1
1.49 +#endif
1.50 +
1.51 +#define _STRICT_ANSI
1.52 +
1.53 +/**
1.54 +From GCC 2.5 onwards it is possible to tell the compiler that functions
1.55 +don't return, which would stop some warnings while building STDLIB
1.56 +*/
1.57 +#if 0
1.58 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)
1.59 +#else
1.60 +#define _ATTRIBUTE(attrs)
1.61 +#endif
1.62 +
1.63 +#ifndef EXPORT_C
1.64 +/**
1.65 +It is needed to annotate the functions which will be exported from the ESTLIB DLL,
1.66 +but mustn't conflict with the definitions in <e32std.h>
1.67 +*/
1.68 +#ifdef __VC32__
1.69 +#define IMPORT_C __declspec(dllexport)
1.70 +#define EXPORT_C __declspec(dllexport)
1.71 +#endif
1.72 +
1.73 +#ifdef __CW32__
1.74 +#define IMPORT_C __declspec(dllexport)
1.75 +#define EXPORT_C __declspec(dllexport)
1.76 +#endif
1.77 +
1.78 +#ifdef __GCC32__
1.79 +#define IMPORT_C
1.80 +#define EXPORT_C __declspec(dllexport)
1.81 +#endif
1.82 +
1.83 +#ifdef __GCCE__
1.84 +#define IMPORT_C __declspec(dllimport)
1.85 +#define EXPORT_C __declspec(dllexport)
1.86 +#endif
1.87 +
1.88 +#endif /* EXPORT_C */
1.89 +#endif /* _ANSIDECL_H_ */