stddef.h revision 99594
1245868Sjasone/*- 2245868Sjasone * Copyright (c) 1990, 1993 3245868Sjasone * The Regents of the University of California. All rights reserved. 4245868Sjasone * 5245868Sjasone * Redistribution and use in source and binary forms, with or without 6234370Sjasone * modification, are permitted provided that the following conditions 7234370Sjasone * are met: 8234370Sjasone * 1. Redistributions of source code must retain the above copyright 9234370Sjasone * notice, this list of conditions and the following disclaimer. 10234370Sjasone * 2. Redistributions in binary form must reproduce the above copyright 11234370Sjasone * notice, this list of conditions and the following disclaimer in the 12234370Sjasone * documentation and/or other materials provided with the distribution. 13234370Sjasone * 3. All advertising materials mentioning features or use of this software 14234370Sjasone * must display the following acknowledgement: 15234370Sjasone * This product includes software developed by the University of 16234370Sjasone * California, Berkeley and its contributors. 17234370Sjasone * 4. Neither the name of the University nor the names of its contributors 18234370Sjasone * may be used to endorse or promote products derived from this software 19234370Sjasone * without specific prior written permission. 20234370Sjasone * 21234370Sjasone * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22245868Sjasone * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23245868Sjasone * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24234370Sjasone * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25234370Sjasone * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26234370Sjasone * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27245868Sjasone * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28245868Sjasone * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29245868Sjasone * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30245868Sjasone * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31245868Sjasone * SUCH DAMAGE. 32245868Sjasone * 33245868Sjasone * @(#)stddef.h 8.1 (Berkeley) 6/2/93 34245868Sjasone * 35245868Sjasone * $FreeBSD: head/include/stddef.h 99594 2002-07-08 16:43:35Z mike $ 36234370Sjasone */ 37245868Sjasone 38234370Sjasone#ifndef _STDDEF_H_ 39245868Sjasone#define _STDDEF_H_ 40245868Sjasone 41234370Sjasone#include <sys/cdefs.h> 42245868Sjasone#include <machine/ansi.h> 43245868Sjasone 44245868Sjasonetypedef _BSD_PTRDIFF_T_ ptrdiff_t; 45234370Sjasone 46245868Sjasone#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 47245868Sjasone#ifdef _BSD_RUNE_T_ 48234370Sjasonetypedef _BSD_RUNE_T_ rune_t; 49245868Sjasone#undef _BSD_RUNE_T_ 50245868Sjasone#endif 51245868Sjasone#endif 52234370Sjasone 53245868Sjasone#ifdef _BSD_SIZE_T_ 54245868Sjasonetypedef _BSD_SIZE_T_ size_t; 55245868Sjasone#undef _BSD_SIZE_T_ 56245868Sjasone#endif 57245868Sjasone 58245868Sjasone#ifdef _BSD_WCHAR_T_ 59245868Sjasonetypedef _BSD_WCHAR_T_ wchar_t; 60245868Sjasone#undef _BSD_WCHAR_T_ 61245868Sjasone#endif 62245868Sjasone 63245868Sjasone#ifndef NULL 64245868Sjasone#define NULL 0 65245868Sjasone#endif 66245868Sjasone 67245868Sjasone#define offsetof(type, member) __offsetof(type, member) 68245868Sjasone 69245868Sjasone#endif /* _STDDEF_H_ */ 70245868Sjasone