7.4.1 <stddef.h>

Defines macro names used in common in the standard include files.

The following macro names are all implementation-defined.

Type

Definition Name

Description

Type (macro)

ptrdiff_t

Indicates the type of the result of subtraction between two pointers.

size_t

Indicates the type of the result of an operation using the sizeof operator.

Constant (macro)

NULL

Indicates the value when a pointer is not pointing at anything.

This value is such that the result of a comparison with 0 using the equality operator (==) is true.

Variable (macro)

errno

If an error occurs during library function processing, the error code defined in the respective library is set in errno.

By setting 0 in errno before calling a library function and checking the error code set in errno after the library function processing has ended, it is possible to check whether an error occurred during the library function processing.

Function (macro)

offsetof

Obtains the offset in bytes from the beginning of a structure to a structure member.

Type (macro)

wchar_t

Type that indicates an extended character.

 

Implementation-Defined Specifications

Item

Compiler Specifications

Value of macro NULL

Value 0 (pointer to void)

Type equivalent to macro ptrdiff_t

long type

Type equivalent to wchar_t

short type