summaryrefslogtreecommitdiff
path: root/static/freebsd/man7/stdint.7 3.html
blob: 5055866086a2d5bab38ff2a495465a876205f720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<table class="head">
  <tr>
    <td class="head-ltitle">STDINT(7)</td>
    <td class="head-vol">Miscellaneous Information Manual</td>
    <td class="head-rtitle">STDINT(7)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">stdint</code> &#x2014; <span class="Nd">standard
    integer types</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">stdint.h</a>&gt;</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="In">&lt;<a class="In">stdint.h</a>&gt;</code>
    header provides source-portable integer types of a specific size, smallest
    memory footprint with a minimum size, fastest access speed with a minimum
    size, largest integer size, and those capable of storing pointers.</p>
<p class="Pp">The types <var class="Vt">int8_t</var>,
    <var class="Vt">int16_t</var>, <var class="Vt">int32_t</var>, and
    <var class="Vt">int64_t</var> provide a signed integer type of width 8, 16,
    32, or 64 bits, respectively. The types <var class="Vt">uint8_t</var>,
    <var class="Vt">uint16_t</var>, <var class="Vt">uint32_t</var>, and
    <var class="Vt">uint64_t</var> provide an unsigned integer type of width 8,
    16, 32, or 64 bits, respectively. These integer types should be used when a
    specific size is required.</p>
<p class="Pp">The types <var class="Vt">int_fast8_t</var>,
    <var class="Vt">int_fast16_t</var>, <var class="Vt">int_fast32_t</var>, and
    <var class="Vt">int_fast64_t</var> provide the fastest signed integer type
    with a width of at least 8, 16, 32, or 64 bits, respectively. The types
    <var class="Vt">uint_fast8_t</var>, <var class="Vt">uint_fast16_t</var>,
    <var class="Vt">uint_fast32_t</var>, and <var class="Vt">uint_fast64_t</var>
    provide the fastest unsigned integer type with a width of at least 8, 16,
    32, or 64 bits, respectively. These types should be used when access speed
    is paramount, and when a specific size is not required.</p>
<p class="Pp">The types <var class="Vt">int_least8_t</var>,
    <var class="Vt">int_least16_t</var>, <var class="Vt">int_least32_t</var>,
    and <var class="Vt">int_least64_t</var> provide the smallest memory
    footprint signed integer type with a width of at least 8, 16, 32, or 64
    bits, respectively. The types <var class="Vt">uint_least8_t</var>,
    <var class="Vt">uint_least16_t</var>, <var class="Vt">uint_least32_t</var>,
    and <var class="Vt">uint_least64_t</var> provide the smallest memory
    footprint unsigned integer type with a width of at least 8, 16, 32, or 64
    bits, respectively. These types should be used when memory storage is of
    concern, and when a specific size is not required.</p>
<p class="Pp">The type <var class="Vt">intmax_t</var> provides a signed integer
    type large enough to hold any other signed integer. The type
    <var class="Vt">uintmax_t</var> provides an unsigned integer type large
    enough to hold any other unsigned integer. These types are generally the
    largest signed and unsigned integer types available on a specific
    architecture.</p>
<p class="Pp">The type <var class="Vt">intptr_t</var> provides a signed integer
    type with the ability to hold a pointer to <var class="Vt">void</var>, that
    can later be converted back to a pointer to <var class="Vt">void</var>.</p>
<p class="Pp">The type <var class="Vt">uintptr_t</var> provides an unsigned
    integer type with the ability to hold a pointer to
    <var class="Vt">void</var>, that can later be converted back to a pointer to
    <var class="Vt">void</var>.</p>
<p class="Pp">Additionally, the
    <code class="In">&lt;<a class="In">stdint.h</a>&gt;</code> header defines
    some macros, but none of them are documented here.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="STANDARDS"><a class="permalink" href="#STANDARDS">STANDARDS</a></h1>
<p class="Pp">The <code class="In">&lt;<a class="In">stdint.h</a>&gt;</code>
    header conforms to <span class="St">ISO/IEC 9899:1999
    (&#x201C;ISO&#x00A0;C99&#x201D;)</span> and <span class="St">IEEE Std
    1003.1-2001 (&#x201C;POSIX.1&#x201D;)</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="In">&lt;<a class="In">stdint.h</a>&gt;</code>
    header was first introduced in <span class="Ux">FreeBSD 5.0</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">September 15, 2002</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>