1.1 --- a/epoc32/include/libc/stddef.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/libc/stddef.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,57 @@
1.4 -stddef.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 +*
1.20 +*/
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 _STDDEF_H_
1.34 +#define _STDDEF_H_
1.35 +
1.36 +/**
1.37 +There seems to be a lot of nonsense about _need_wchar_t etc., but for
1.38 +STDLIB we have cut the Gordian knot and done the simple thing.
1.39 +*/
1.40 +#ifndef __wchar_t_defined
1.41 +#ifndef __GCCXML__
1.42 +typedef unsigned short int wchar_t;
1.43 +#endif
1.44 +#endif
1.45 +
1.46 +#ifndef _PTRDIFF_T_DEFINED
1.47 +#define _PTRDIFF_T_DEFINED
1.48 +typedef long ptrdiff_t;
1.49 +#endif //_PTRDIFF_T_DEFINED
1.50 +
1.51 +#ifndef _SIZE_T_DEFINED
1.52 +#define _SIZE_T_DEFINED
1.53 +typedef unsigned int size_t;
1.54 +#endif //_SIZE_T_DEFINED
1.55 +
1.56 +/**
1.57 +Offset of member MEMBER in a struct of type TYPE.
1.58 +*/
1.59 +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
1.60 +
1.61 +#endif /* _STDDEF_H_ */