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