ack/lang/cem/libcc.ansi/headers/stddef.h

35 lines
868 B
C
Raw Normal View History

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
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-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 */
1990-04-04 16:21:34 +00:00
#elif _EM_PSIZE == _EM_LSIZE
1989-12-18 14:00:32 +00:00
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
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
#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 */