1989-05-16 13:13:53 +00:00
|
|
|
/*
|
|
|
|
* stddef.h - common definitions
|
|
|
|
*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#if !defined(_STDDEF_H)
|
|
|
|
#define _STDDEF_H
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#define NULL ((void *)0)
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1990-01-22 13:20:42 +00:00
|
|
|
#define offsetof(type, ident) ((size_t) &(((type *)0)->ident))
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#if _EM_PSIZE == 2
|
1989-05-16 13:13:53 +00:00
|
|
|
typedef int ptrdiff_t; /* result of substracting two pointers */
|
1989-12-18 14:00:32 +00:00
|
|
|
#elif _EM_PSIZE == 4
|
|
|
|
typedef long ptrdiff_t; /* result of substracting two pointers */
|
|
|
|
#else
|
|
|
|
#error garbage pointer size
|
|
|
|
#endif /* _EM_PSIZE */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#if !defined(_SIZE_T)
|
|
|
|
#define _SIZE_T
|
|
|
|
#if _EM_WSIZE == _EM_PSIZE
|
1989-05-16 13:13:53 +00:00
|
|
|
typedef unsigned int size_t; /* type returned by sizeof */
|
1989-12-18 14:00:32 +00:00
|
|
|
#else
|
|
|
|
typedef unsigned long size_t; /* type returned by sizeof */
|
|
|
|
#endif
|
|
|
|
#endif /* _SIZE_T */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#if !defined(_WCHAR_T)
|
|
|
|
#define _WCHAR_T
|
1989-05-16 13:13:53 +00:00
|
|
|
typedef char wchar_t; /* type expanded character set */
|
1989-12-18 14:00:32 +00:00
|
|
|
#endif /* _WCHAR_T */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1989-12-18 14:00:32 +00:00
|
|
|
#endif /* _STDDEF_H */
|