Debian Codegraph @

upstream/debian-unstable/man3/intmax_t.3type

raw
1 .\" Copyright 2020, Michael Kerrisk <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH intmax_t 3type 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 intmax_t, uintmax_t \- greatest-width basic integer types
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc )
12 .SH SYNOPSIS
13 .nf
14 .B #include <stdint.h>
15 .P
16 .BR typedef " /* ... */ " intmax_t;
17 .BR typedef " /* ... */ " uintmax_t;
18 .P
19 .BR "#define INTMAX_WIDTH " "/* ... */"
20 .B "#define UINTMAX_WIDTH INTMAX_WIDTH"
21 .P
22 .BR "#define INTMAX_MAX " "/* 2**(INTMAX_WIDTH - 1) - 1 */"
23 .BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */"
24 .BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */"
25 .P
26 .BI "#define INTMAX_C(" c ) " c " ## " \f[R]/* ... */\f[]"
27 .BI "#define UINTMAX_C(" c ) " c " ## " \f[R]/* ... */\f[]"
28 .fi
29 .SH DESCRIPTION
30 .I intmax_t
31 is a signed integer type
32 capable of representing any value of any basic signed integer type
33 supported by the implementation.
34 It is capable of storing values in the range
35 .RB [ INTMAX_MIN ,
36 .BR INTMAX_MAX ].
37 .P
38 .I uintmax_t
39 is an unsigned integer type
40 capable of representing any value of any basic unsigned integer type
41 supported by the implementation.
42 It is capable of storing values in the range
43 .RB [ 0 ,
44 .BR UINTMAX_MAX ].
45 .P
46 The macros
47 .RB [ U ] INTMAX_WIDTH
48 expand to the width in bits of these types.
49 .P
50 The macros
51 .RB [ U ] INTMAX_MAX
52 expand to the maximum value that these types can hold.
53 .P
54 The macro
55 .B INTMAX_MIN
56 expands to the minimum value that
57 .I intmax_t
58 can hold.
59 .P
60 The macros
61 .RB [ U ] INTMAX_C ()
62 expand their argument to an integer constant of type
63 .RI [ u ] intmax_t .
64 .P
65 The length modifier for
66 .RI [ u ] intmax_t
67 for the
68 .BR printf (3)
69 and the
70 .BR scanf (3)
71 families of functions is
72 .BR j ;
73 resulting commonly in
74 .BR %jd ,
75 .BR %ji ,
76 .BR %ju ,
77 or
78 .B %jx
79 for printing
80 .RI [ u ] intmax_t
81 values.
82 .SH STANDARDS
83 C11, POSIX.1-2024.
84 .SH HISTORY
85 C99, POSIX.1-2001.
86 .SH NOTES
87 The following header also provides these types:
88 .IR <inttypes.h> .
89 .SH BUGS
90 These types may not be as large as extended integer types, such as
91 .I __int128
92 .SH SEE ALSO
93 .BR int64_t (3type),
94 .BR intptr_t (3type),
95 .BR printf (3),
96 .BR strtoimax (3)