2005-04-21 16:53:53 +02:00
|
|
|
/* The <stddef.h> header defines certain commonly used macros. */
|
|
|
|
|
|
|
|
#ifndef _STDDEF_H
|
|
|
|
#define _STDDEF_H
|
|
|
|
|
2010-07-22 12:03:31 +02:00
|
|
|
#include <sys/null.h>
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* The following is not portable, but the compiler accepts it. */
|
2010-08-25 09:25:32 +02:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define offsetof(type, ident) __builtin_offsetof (type, ident)
|
|
|
|
#else
|
2005-04-21 16:53:53 +02:00
|
|
|
#define offsetof(type, ident) ((size_t) (unsigned long) &((type *)0)->ident)
|
2010-08-25 09:25:32 +02:00
|
|
|
#endif
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
#if _EM_PSIZE == _EM_WSIZE
|
|
|
|
typedef int ptrdiff_t; /* result of subtracting two pointers */
|
|
|
|
#else /* _EM_PSIZE == _EM_LSIZE */
|
|
|
|
typedef long ptrdiff_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _SIZE_T
|
|
|
|
#define _SIZE_T
|
|
|
|
typedef unsigned int size_t; /* type returned by sizeof */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _WCHAR_T
|
|
|
|
#define _WCHAR_T
|
|
|
|
typedef char wchar_t; /* type expanded character set */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _STDDEF_H */
|