STDDEF(3)

πŸ“¦ version 11.0, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, you're reading STDDEF(3) from the Library Functions Manual β€” the stddef page, aka standard type definitions. it's giving foundational header energy, and yes, we're gonna get through every single detail together. πŸ’…βœ¨

✨ SYNOPSIS ✨

#include <stddef.h>

that's the include. short, iconic, no notes. πŸŽ€

πŸ’– DESCRIPTION πŸ’–

The <stddef.h> header defines the following types and macros, and you're gonna know all of them:

  1. ptrdiff_t β€” a signed integer type of the result of subtracting two pointers;
  2. size_t β€” an unsigned integer type of the result of the sizeof() operator;
  3. wchar_t β€” an integer type whose range of values can represent distinct wide-character codes for all members of the largest character set specified among the supported locales: the null character has the code value 0, and each member of the character set has a code value equal to its value when used as the lone character in an integer character constant;
  4. NULL β€” which expands to an implementation-defined null pointer constant; and
  5. offsetof() β€” a macro that expands to an integer constant, as described in offsetof(3).

Some of the described types and macros may appear also in other headers. lowkey they get around. πŸ¦‹

πŸ¦‹ SEE ALSO πŸ¦‹

go give these pages a lil read, bestie:

πŸ‘‘ STANDARDS πŸ‘‘

As described here, the <stddef.h> header conforms to ISO/IEC 9899:1999 (β€œISO C99”) and IEEE Std 1003.1-2001 (β€œPOSIX.1”). Some of the types and macros conform to earlier standards such as ANSI X3.159-1989 (β€œANSI C89”). history lesson but make it header lore. ⭐

πŸŽ€ HISTORY πŸŽ€

In the current form, the <stddef.h> header was introduced in NetBSD 0.8, the first official release of NetBSD. Some definitions such as NULL were first introduced already in the <nsys/param.h> header of Version 4 AT&T UNIX. literally ancient. πŸ’€


Mwah πŸ’‹ β€” this cutie comes from Debian, dated April 10, 2011, and it's the STDDEF(3) page. byeeee 🫢✨

πŸ“¦ where this page comes from