1.1 --- a/epoc32/include/stdapis/_ansi.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/_ansi.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,106 @@
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 +* Redistribution and use in source and binary forms, with or without
1.20 +* modification, are permitted provided that the following conditions are met:
1.21 +* Redistributions of source code must retain the above copyright notice, this
1.22 +* list of conditions and the following disclaimer.
1.23 +* Redistributions in binary form must reproduce the above copyright notice,
1.24 +* this list of conditions and the following disclaimer in the documentation
1.25 +* and/or other materials provided with the distribution.
1.26 +* Neither the name of the <ORGANIZATION> nor the names of its contributors
1.27 +* may be used to endorse or promote products derived from this software
1.28 +* without specific prior written permission.
1.29 +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1.30 +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.31 +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1.32 +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
1.33 +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.34 +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1.35 +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1.36 +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1.37 +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1.38 +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.39 +* To get a strict ANSI C environment, define macro _STRICT_ANSI. This will
1.40 +* "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
1.41 +* files aren't affected).
1.42 +*
1.43 +*
1.44 +*/
1.45 +
1.46 +
1.47 +
1.48 +
1.49 +
1.50 +
1.51 +#ifndef _ANSIDECL_H_
1.52 +#define _ANSIDECL_H_
1.53 +
1.54 +/**
1.55 +Epoc32 STDLIB is an ANSI environment and expects an ANSI C compiler
1.56 +MSVC is however an environment which doesn't define __STDC__, so
1.57 +we fix it up in here...
1.58 +*/
1.59 +
1.60 +#ifndef __STDC__
1.61 +#define __STDC__ 1
1.62 +#endif
1.63 +
1.64 +#define _STRICT_ANSI
1.65 +
1.66 +/**
1.67 +From GCC 2.5 onwards it is possible to tell the compiler that functions
1.68 +don't return, which would stop some warnings while building STDLIB
1.69 +*/
1.70 +#if 0
1.71 +#define _ATTRIBUTE(attrs) __attribute__ (attrs)
1.72 +#else
1.73 +#define _ATTRIBUTE(attrs)
1.74 +#endif
1.75 +
1.76 +/*
1.77 +
1.78 +*/
1.79 +
1.80 +#ifndef EXPORT_C
1.81 +/**
1.82 +It is needed to annotate the functions which will be exported from the ESTLIB DLL,
1.83 +but mustn't conflict with the definitions in <e32std.h>
1.84 +*/
1.85 +#ifdef __VC32__
1.86 +#define IMPORT_C __declspec(dllexport)
1.87 +#define EXPORT_C __declspec(dllexport)
1.88 +#endif
1.89 +
1.90 +#ifdef __CW32__
1.91 +#define IMPORT_C __declspec(dllexport)
1.92 +#define EXPORT_C __declspec(dllexport)
1.93 +#endif
1.94 +
1.95 +#ifdef __GCC32__
1.96 +#define IMPORT_C
1.97 +#define EXPORT_C __declspec(dllexport)
1.98 +#endif
1.99 +
1.100 +#ifdef __SYMBIAN32__
1.101 +#ifdef __cplusplus
1.102 +#include <e32def.h>
1.103 +#endif
1.104 +#else
1.105 +#define IMPORT_C
1.106 +#define EXPORT_C
1.107 +#endif
1.108 +
1.109 +#endif /* EXPORT_C */
1.110 +#endif /* _ANSIDECL_H_ */