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

NAME

12       stddef.h — standard type definitions
13

SYNOPSIS

15       #include <stddef.h>
16

DESCRIPTION

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

APPLICATION USAGE

58       None.
59

RATIONALE

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

FUTURE DIRECTIONS

67       None.
68

SEE ALSO

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