DarkAtom
DarkAtom

Reputation: 3161

In what header is rsize_t defined?

I know the C11 standard defines rsize_t as size_t in the optional Annex K, but in what header file(s)? Where does the C standard say this type should be defined?

Upvotes: 7

Views: 1821

Answers (2)

user2201041
user2201041

Reputation:

K.3.3 Common definitions <stddef.h>

  1. The header <stddef.h> defines a type.

  2. The type is rsize_t which is the type size_t .

Quoting the draft.

Reading further, this is also defined in <string.h>, <stdlib.h>, <stdio.h>, <wchar.h> and <time.h>. There may be others.

Upvotes: 7

amin saffar
amin saffar

Reputation: 2033

From https://en.wikibooks.org/wiki/C_Programming/stddef.h

stddef.h is a header file in the standard library of the C programming language that defines the macros NULL and offsetof as well as the types size_t, wchar_t, and ptrdiff_t.

rsize_t is define in stdlib.h

Upvotes: 1

Related Questions