stddef.h revision 102227
11539Srgrimes/*-
21539Srgrimes * Copyright (c) 1990, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
131539Srgrimes * 3. All advertising materials mentioning features or use of this software
141539Srgrimes *    must display the following acknowledgement:
151539Srgrimes *	This product includes software developed by the University of
161539Srgrimes *	California, Berkeley and its contributors.
171539Srgrimes * 4. Neither the name of the University nor the names of its contributors
181539Srgrimes *    may be used to endorse or promote products derived from this software
191539Srgrimes *    without specific prior written permission.
201539Srgrimes *
211539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311539Srgrimes * SUCH DAMAGE.
321539Srgrimes *
331539Srgrimes *	@(#)stddef.h	8.1 (Berkeley) 6/2/93
3467708Sphk *
3567708Sphk * $FreeBSD: head/include/stddef.h 102227 2002-08-21 16:20:02Z mike $
361539Srgrimes */
371539Srgrimes
381539Srgrimes#ifndef _STDDEF_H_
391539Srgrimes#define _STDDEF_H_
401539Srgrimes
4199594Smike#include <sys/cdefs.h>
42102227Smike#include <sys/_types.h>
431539Srgrimes
44102227Smiketypedef	__ptrdiff_t	ptrdiff_t;
451539Srgrimes
4615483Sbde#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
47102227Smike#ifndef _RUNE_T_DECLARED
48102227Smiketypedef	__rune_t	rune_t;
49102227Smike#define	_RUNE_T_DECLARED
5015483Sbde#endif
5115483Sbde#endif
5215483Sbde
53102227Smike#ifndef _SIZE_T_DECLARED
54102227Smiketypedef	__size_t	size_t;
55102227Smike#define	_SIZE_T_DECLARED
561539Srgrimes#endif
571539Srgrimes
5899640Sobrien#ifndef	__cplusplus
59102227Smike#ifndef _WCHAR_T_DECLARED
60102227Smiketypedef	__wchar_t	wchar_t;
61102227Smike#define	_WCHAR_T_DECLARED
621539Srgrimes#endif
6399640Sobrien#endif
641539Srgrimes
651539Srgrimes#ifndef	NULL
661539Srgrimes#define	NULL	0
671539Srgrimes#endif
681539Srgrimes
6967708Sphk#define	offsetof(type, member)	__offsetof(type, member)
701539Srgrimes
711539Srgrimes#endif /* _STDDEF_H_ */
72