stddef.h(7POSIX)
π stddef.h β standard type definitions π
okay so bestie, welcome to the <strong>POSIX Programmer's Manual</strong> (that's the manual name, section <code>7POSIX</code>, in case the vibe check demanded receipts). This one's all about <code>stddef.h</code> and it is, genuinely, the blueprint page. No cap.
πΈ PROLOG πΈ
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
tl;dr: Linux might do its own thing here, or might not do it at all. Check the Linux page, bestie. π«Ά
β¨ NAME β¨
stddef.h β standard type definitions
π SYNOPSIS π
#include <stddef.h>
π DESCRIPTION π
So the functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1β2017 defers to the ISO C standard. It's giving "we're not fighting ISO C, ISO C is the referee, we're just vibing alongside it." π
The <stddef.h> header shall define the following macros:
NULLβ Null pointer constant. The macro shall expand to an integer constant expression with the value0cast to typevoid *.offsetof(type, member-designator)β Integer constant expression of typesize_t, the value of which is the offset in bytes to the structure member (member-designator), from the beginning of its structure (type).
The <stddef.h> header shall define the following types:
ptrdiff_tβ Signed integer type of the result of subtracting two pointers.wchar_tβ Integer type whose range of values can represent distinct codes for all members of the largest extended character set specified among the supported locales; the null character shall have the code value zero. Each member of the basic character set shall have a code value equal to its value when used as the lone character in an integer character constant if an implementation does not define__STDC_MB_MIGHT_NEQ_WC__.size_tβ Unsigned integer type of the result of thesizeofoperator.
The implementation shall support one or more programming environments in which the widths of ptrdiff_t, size_t, and wchar_t are no greater than the width of type long. The names of these programming environments can be obtained using the confstr() function or the getconf utility. π
The following sections are informative. (i.e. the fun extras, not the binding rules β we're just chatting now π¬)
π APPLICATION USAGE π
None.
Yep. That's it. Empty. Iconic behaviour honestly, it said nothing and left. π
π¦ RATIONALE π¦
The ISO C standard does not require the NULL macro to include the cast to type void * and specifies that the NULL macro be implementation-defined. POSIX.1β2008 requires the cast and therefore need not be implementation-defined.
the way that POSIX said "actually we're locking the cast in so it's not implementation-defined anymore" β main character energy fr fr π
π₯ FUTURE DIRECTIONS π₯
None.
Nothing coming down the pipeline. She's perfect, she's done, periodt. π
β SEE ALSO β
<sys_types.h>,<wchar.h>- The System Interfaces volume of POSIX.1β2017,
confstr() - The Shell and Utilities volume of POSIX.1β2017,
getconf
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie!! brought to you by IEEE/The Open Group, 2017 β yeah, 2017, we been knew, the standard is a little vintage but she still slays β¨ππ go forth and #include <stddef.h> responsibly, ily π«Ά
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms