Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / libcc.ansi / headers / stddef.h
1 /*
2  * stddef.h - common definitions
3  *
4  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
5  * See the copyright notice in the ACK home directory, in the file "Copyright".
6  */
7 /* $Id: stddef.h,v 1.9 1994/06/24 11:41:17 ceriel Exp $ */
8
9 #if     !defined(_STDDEF_H)
10 #define _STDDEF_H
11
12 #define NULL            ((void *)0)
13
14 #define offsetof(type, ident)   ((size_t) (unsigned long) &((type *)0)->ident)
15
16 #if     _EM_PSIZE == _EM_WSIZE
17 typedef int     ptrdiff_t;      /* result of substracting two pointers */
18 #elif   _EM_PSIZE == _EM_LSIZE
19 typedef long    ptrdiff_t;      /* result of substracting two pointers */
20 #else
21 #error garbage pointer size
22 #endif  /* _EM_PSIZE */
23
24 #if     !defined(_SIZE_T)
25 #define _SIZE_T
26 typedef unsigned int    size_t;         /* type returned by sizeof */
27 #endif  /* _SIZE_T */
28
29 #if     !defined(_WCHAR_T)
30 #define _WCHAR_T
31 typedef char    wchar_t;                /* type expanded character set */
32 #endif  /* _WCHAR_T */
33
34 #endif  /* _STDDEF_H */