1 /*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)stddef.h 8.1 (Berkeley) 06/02/93 8 */ 9 10 #ifndef _STDDEF_H_ 11 #define _STDDEF_H_ 12 13 #include <machine/ansi.h> 14 15 typedef _BSD_PTRDIFF_T_ ptrdiff_t; 16 17 #ifdef _BSD_SIZE_T_ 18 typedef _BSD_SIZE_T_ size_t; 19 #undef _BSD_SIZE_T_ 20 #endif 21 22 #ifdef _BSD_WCHAR_T_ 23 #ifndef _ANSI_SOURCE 24 typedef _BSD_WCHAR_T_ rune_t; 25 #endif 26 typedef _BSD_WCHAR_T_ wchar_t; 27 #undef _BSD_WCHAR_T_ 28 #endif 29 30 #ifndef NULL 31 #define NULL 0 32 #endif 33 34 #define offsetof(type, member) ((size_t)(&((type *)0)->member)) 35 36 #endif /* _STDDEF_H_ */ 37