]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man7/stdint.7
Connect mitigations(7) to the build
[FreeBSD/FreeBSD.git] / share / man / man7 / stdint.7
1 .\" Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .Dd September 15, 2002
26 .Dt STDINT 7
27 .Os
28 .Sh NAME
29 .Nm stdint
30 .Nd "standard integer types"
31 .Sh SYNOPSIS
32 .In stdint.h
33 .Sh DESCRIPTION
34 The
35 .In stdint.h
36 header provides source-portable integer types of a specific
37 size, smallest memory footprint with a minimum size, fastest
38 access speed with a minimum size, largest integer size, and
39 those capable of storing pointers.
40 .Pp
41 The types
42 .Vt int8_t ,
43 .Vt int16_t ,
44 .Vt int32_t ,
45 and
46 .Vt int64_t
47 provide a signed integer type of width 8, 16, 32, or 64 bits, respectively.
48 The types
49 .Vt uint8_t ,
50 .Vt uint16_t ,
51 .Vt uint32_t ,
52 and
53 .Vt uint64_t
54 provide an unsigned integer type of width 8, 16, 32, or 64 bits, respectively.
55 These integer types should be used when a specific size is required.
56 .Pp
57 The types
58 .Vt int_fast8_t ,
59 .Vt int_fast16_t ,
60 .Vt int_fast32_t ,
61 and
62 .Vt int_fast64_t
63 provide the fastest signed integer type with a width
64 of at least 8, 16, 32, or 64 bits, respectively.
65 The types
66 .Vt uint_fast8_t ,
67 .Vt uint_fast16_t ,
68 .Vt uint_fast32_t ,
69 and
70 .Vt uint_fast64_t
71 provide the fastest unsigned integer type with a width
72 of at least 8, 16, 32, or 64 bits, respectively.
73 These types should be used when access speed is
74 paramount, and when a specific size is not required.
75 .Pp
76 The types
77 .Vt int_least8_t ,
78 .Vt int_least16_t ,
79 .Vt int_least32_t ,
80 and
81 .Vt int_least64_t
82 provide the smallest memory footprint signed integer type with
83 a width of at least 8, 16, 32, or 64 bits, respectively.
84 The types
85 .Vt uint_least8_t ,
86 .Vt uint_least16_t ,
87 .Vt uint_least32_t ,
88 and
89 .Vt uint_least64_t
90 provide the smallest memory footprint unsigned integer type with
91 a width of at least 8, 16, 32, or 64 bits, respectively.
92 These types should be used when memory storage is of
93 concern, and when a specific size is not required.
94 .Pp
95 The type
96 .Vt intmax_t
97 provides a signed integer type large
98 enough to hold any other signed integer.
99 The type
100 .Vt uintmax_t
101 provides an unsigned integer type large
102 enough to hold any other unsigned integer.
103 These types are generally the largest signed and unsigned
104 integer types available on a specific architecture.
105 .Pp
106 The type
107 .Vt intptr_t
108 provides a signed integer type with the ability to hold a pointer to
109 .Vt void ,
110 that can later be converted back to a pointer to
111 .Vt void .
112 .Pp
113 The type
114 .Vt uintptr_t
115 provides an unsigned integer type with the ability to hold a pointer to
116 .Vt void ,
117 that can later be converted back to a pointer to
118 .Vt void .
119 .Pp
120 Additionally, the
121 .In stdint.h
122 header defines some macros, but none of them are documented here.
123 .Sh STANDARDS
124 The
125 .In stdint.h
126 header conforms to
127 .St -isoC-99
128 and
129 .St -p1003.1-2001 .
130 .Sh HISTORY
131 The
132 .In stdint.h
133 header was first introduced in
134 .Fx 5.0 .