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".
|
|
|
|
*/
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
2007-04-24 19:42:24 +00:00
|
|
|
#ifndef _STDDEF_H
|
1989-12-18 14:00:32 +00:00
|
|
|
#define _STDDEF_H
|
1989-05-16 13:13:53 +00:00
|
|
|
|
2007-04-24 19:42:24 +00:00
|
|
|
#define NULL 0
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1990-10-30 09:53:48 +00:00
|
|
|
#define offsetof(type, ident) ((size_t) (unsigned long) &((type *)0)->ident)
|
1989-05-16 13:13:53 +00:00
|
|
|
|
1990-04-04 16:21:34 +00:00
|
|
|
#if _EM_PSIZE == _EM_WSIZE
|
1989-05-16 13:13:53 +00:00
|
|
|
typedef int ptrdiff_t; /* result of substracting two pointers */
|
2007-04-24 19:42:24 +00:00
|
|
|
typedef int intptr_t; /* an integer big enough to store a pointer */
|
|
|
|
#elif _EM_PSIZE == _EM_LSIZE
|
|
|
|
typedef long ptrdiff_t; /* result of substracting two pointers */
|
|
|
|
typedef long intptr_t; /* an integer big enough to store a pointer */
|
1989-12-18 14:00:32 +00:00
|
|
|
#else
|
2007-04-24 19:42:24 +00:00
|
|
|
#error unsupported pointer size
|
1989-12-18 14:00:32 +00:00
|
|
|
#endif /* _EM_PSIZE */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
2007-04-24 19:42:24 +00:00
|
|
|
typedef unsigned int size_t; /* type returned by sizeof */
|
|
|
|
typedef char wchar_t; /* type of a wide character */
|
|
|
|
typedef long off_t; /* type of a position offset */
|
1989-05-16 13:13:53 +00:00
|
|
|
|
2007-04-24 19:42:24 +00:00
|
|
|
#endif
|