1.\" $NetBSD: stddef.3,v 1.7 2010/05/14 02:45:39 joerg Exp $ 2.\" 3.\" Copyright (c) 2010 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jukka Ruohonen. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd March 21, 2010 31.Dt STDDEF 3 32.Os 33.Sh NAME 34.Nm stddef 35.Nd standard type definitions 36.Sh SYNOPSIS 37.In stddef.h 38.Sh DESCRIPTION 39The 40.In stddef.h 41header defines the following types and macros: 42.Bl -enum -offset 4n 43.It 44.Vt ptrdiff_t , 45a signed integer type of the result of subtracting two pointers; 46.It 47.Vt size_t , 48an unsigned integer type of the result of the 49.Fn sizeof 50operator; 51.It 52.Vt wchar_t , 53an integer type whose range of values can represent distinct wide-character 54codes for all members of the largest character set specified among the 55supported locales: the null character has the code value 0 and each member 56of the character set has a code value equal to its value when used 57as the lone character in an integer character constant; 58.It 59.Dv NULL , 60which expands to an implementation-defined null pointer constant; and 61.It 62.Fn offsetof , 63a macro that expands to an integer constant as described in 64.Xr offsetof 3 . 65.El 66.Pp 67Some of the described types and macros may appear also in other headers. 68.Sh SEE ALSO 69.Xr offsetof 3 , 70.Xr stdlib 3 71.Sh STANDARDS 72As described here, the 73.In stddef.h 74header conforms to 75.St -isoC-99 76and 77.St -p1003.1-2001 . 78Some of the types and macros conform to earlier standards such as 79.St -ansiC . 80.Sh HISTORY 81In the current form the 82.In stddef.h 83header was introduced in 84.Nx 0.8 , 85the first official release of 86.Nx . 87Some definitions such as 88.Dv NULL 89were first introduced already in the 90.In nsys/param.h 91header of 92.At v4 . 93