1stddef.h(0P)               POSIX Programmer's Manual              stddef.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       stddef.h — standard type definitions
14

SYNOPSIS

16       #include <stddef.h>
17

DESCRIPTION

19       The functionality described on this reference page is aligned with  the
20       ISO C  standard.  Any  conflict between the requirements described here
21       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
22       defers to the ISO C standard.
23
24       The <stddef.h> header shall define the following macros:
25
26       NULL      Null  pointer constant.  The macro shall expand to an integer
27                 constant expression with the value 0 cast to type void *.
28
29       offsetof(type, member-designator)
30                 Integer constant expression of  type  size_t,  the  value  of
31                 which is the offset in bytes to the structure member (member-
32                 designator), from the beginning of its structure (type).
33
34       The <stddef.h> header shall define the following types:
35
36       ptrdiff_t Signed integer type of the result of subtracting  two  point‐
37                 ers.
38
39       wchar_t   Integer  type  whose  range  of values can represent distinct
40                 codes for all members of the largest extended  character  set
41                 specified  among  the  supported  locales; the null character
42                 shall have the code value zero.  Each  member  of  the  basic
43                 character set shall have a code value equal to its value when
44                 used as the lone character in an integer  character  constant
45                 if      an      implementation      does      not      define
46                 __STDC_MB_MIGHT_NEQ_WC__.
47
48       size_t    Unsigned integer type of the result of the sizeof operator.
49
50       The implementation shall support one or more  programming  environments
51       in  which  the  widths of ptrdiff_t, size_t, and wchar_t are no greater
52       than the width of type long.  The names of these  programming  environ‐
53       ments can be obtained using the confstr() function or the getconf util‐
54       ity.
55
56       The following sections are informative.
57

APPLICATION USAGE

59       None.
60

RATIONALE

62       The ISO C standard does not require the NULL macro to include the  cast
63       to  type  void  *  and specifies that the NULL macro be implementation-
64       defined. POSIX.1‐2008 requires the  cast  and  therefore  need  not  be
65       implementation-defined.
66

FUTURE DIRECTIONS

68       None.
69

SEE ALSO

71       <sys_types.h>, <wchar.h>
72
73       The System Interfaces volume of POSIX.1‐2008, confstr()
74
75       The Shell and Utilities volume of POSIX.1‐2008, getconf
76
78       Portions  of  this text are reprinted and reproduced in electronic form
79       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
80       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
81       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
82       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
83       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
84       event of any discrepancy between this version and the original IEEE and
85       The Open Group Standard, the original IEEE and The Open Group  Standard
86       is  the  referee document. The original Standard can be obtained online
87       at http://www.unix.org/online.html .
88
89       Any typographical or formatting errors that appear  in  this  page  are
90       most likely to have been introduced during the conversion of the source
91       files to man page format. To report such errors,  see  https://www.ker
92       nel.org/doc/man-pages/reporting_bugs.html .
93
94
95
96IEEE/The Open Group                  2013                         stddef.h(0P)
Impressum