/* STDDEF.H
 * 
 * Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
 */

#ifndef _STDDEF_H_
#define _STDDEF_H_

/* There seems to be a lot of nonsense about _need_wchar_t etc., but for
 * STDLIB we have cut the Gordian knot and done the simple thing.
 */

typedef int		wchar_t;
typedef long		ptrdiff_t;

/* This type is implementation-dependent because it's the type returned by the
 * sizeof() operator. Sadly GCC and MSVC++ 5.0 have different views about what
 * this type should be, and getting it wrong produces compilation errors in
 * both systems. There isn't a real portability issue unless long is a different
 * size from int, but both compilers get upset by the type mismatches.
 */
#ifdef __VC32__
typedef unsigned int	size_t;
#endif

#ifdef __GCC32__
typedef unsigned long	size_t;
#endif

/* Offset of member MEMBER in a struct of type TYPE.  */
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)

#endif /* _STDDEF_H_ */
