xref: /original-bsd/include/stddef.h (revision 87c91b73)
1 /*-
2  * Copyright (c) 1990 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)stddef.h	5.2 (Berkeley) 05/17/90
8  */
9 
10 #ifndef _STDDEF_H_
11 #define _STDDEF_H_
12 #include <machine/machtypes.h>
13 
14 typedef	_PTRDIFF_T_	ptrdiff_t;
15 
16 #ifdef	_SIZE_T_
17 typedef	_SIZE_T_	size_t;
18 #undef	_SIZE_T_
19 #endif
20 
21 #ifdef	_WCHAR_T_
22 typedef	_WCHAR_T_	wchar_t;
23 #undef	_WCHAR_T_
24 #endif
25 
26 #ifndef	NULL
27 #define	NULL	0
28 #endif
29 
30 #define	offsetof(type, member)	((size_t)(&((type *)0)->member))
31 
32 #endif /* _STDDEF_H_ */
33