616 lines
20 KiB
HTML
616 lines
20 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title><stdint.h></title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="<stdint.h>"></a> <a name="tag_13_48"></a><!-- <stdint.h> -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_13_48_01"></a>NAME</h4>
|
|
|
|
<blockquote>stdint.h - integer types</blockquote>
|
|
|
|
<h4><a name="tag_13_48_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<p><tt>#include <stdint.h></tt></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_48_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<div class="box"><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"
|
|
border="0"> Some of the functionality described on this reference page extends the ISO C standard. Applications shall define
|
|
the appropriate feature test macro (see the System Interfaces volume of IEEE Std 1003.1-2001, <a href=
|
|
"../functions/xsh_chap02_02.html">Section 2.2, The Compilation Environment</a>) to enable the visibility of these symbols in this
|
|
header. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></div>
|
|
|
|
<p>The <i><stdint.h></i> header shall declare sets of integer types having specified widths, and shall define corresponding
|
|
sets of macros. It shall also define macros that specify limits of integer types corresponding to types defined in other standard
|
|
headers. <basefont size="2"></p>
|
|
|
|
<dl>
|
|
<dt><b>Note:</b></dt>
|
|
|
|
<dd>The "width" of an integer type is the number of bits used to store its value in a pure binary system; the actual type may use
|
|
more bits than that (for example, a 28-bit type could be stored in 32 bits of actual storage). An <i>N</i>-bit signed type has
|
|
values in the range -2<small><sup><i>N</i>-1</sup></small> or 1-2<small><sup><i>N</i>-1</sup></small> to
|
|
2<small><sup><i>N</i>-1</sup></small>-1, while an <i>N</i>-bit unsigned type has values in the range 0 to
|
|
2<small><sup><i>N</i></sup></small>-1.</dd>
|
|
</dl>
|
|
|
|
<basefont size="3">
|
|
|
|
<p>Types are defined in the following categories:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Integer types having certain exact widths</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Integer types having at least certain specified widths</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Fastest integer types having at least certain specified widths</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Integer types wide enough to hold pointers to objects</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Integer types having greatest width</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>(Some of these types may denote the same type.)</p>
|
|
|
|
<p>Corresponding macros specify limits of the declared types and construct suitable constants.</p>
|
|
|
|
<p>For each type described herein that the implementation provides, the <i><stdint.h></i> header shall declare that
|
|
<b>typedef</b> name and define the associated macros. Conversely, for each type described herein that the implementation does not
|
|
provide, the <i><stdint.h></i> header shall not declare that <b>typedef</b> name, nor shall it define the associated macros.
|
|
An implementation shall provide those types described as required, but need not provide any of the others (described as
|
|
optional).</p>
|
|
|
|
<h5><a name="tag_13_48_03_01"></a>Integer Types</h5>
|
|
|
|
<p>When <b>typedef</b> names differing only in the absence or presence of the initial <i>u</i> are defined, they shall denote
|
|
corresponding signed and unsigned types as described in the ISO/IEC 9899:1999 standard, Section 6.2.5; an implementation
|
|
providing one of these corresponding types shall also provide the other.</p>
|
|
|
|
<p>In the following descriptions, the symbol <i>N</i> represents an unsigned decimal integer with no leading zeros (for example, 8
|
|
or 24, but not 04 or 048).</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Exact-width integer types</p>
|
|
|
|
<p>The <b>typedef</b> name <b>int</b> <i>N</i> <b>_t</b> designates a signed integer type with width <i>N</i>, no padding bits, and
|
|
a two's-complement representation. Thus, <b>int8_t</b> denotes a signed integer type with a width of exactly 8 bits.</p>
|
|
|
|
<p>The <b>typedef</b> name <b>uint</b> <i>N</i> <b>_t</b> designates an unsigned integer type with width <i>N</i>. Thus,
|
|
<b>uint24_t</b> denotes an unsigned integer type with a width of exactly 24 bits.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> The
|
|
following types are required:</p>
|
|
|
|
<p><br>
|
|
<b>int8_t</b><br>
|
|
<b>int16_t</b><br>
|
|
<b>int32_t</b><br>
|
|
<b>uint8_t</b><br>
|
|
<b>uint16_t</b><br>
|
|
<b>uint32_t</b><img src="../images/opt-end.gif" alt="[Option End]" border="0"><br>
|
|
</p>
|
|
|
|
<p>If an implementation provides integer types with width 64 that meet these requirements, then the following types are required:
|
|
<b>int64_t</b> <b>uint64_t</b></p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> In
|
|
particular, this will be the case if any of the following are true:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>The implementation supports the _POSIX_V6_ILP32_OFFBIG programming environment and the application is being built in the
|
|
_POSIX_V6_ILP32_OFFBIG programming environment (see the Shell and Utilities volume of IEEE Std 1003.1-2001, <a href=
|
|
"../utilities/c99.html"><i>c99</i></a>, Programming Environments).</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The implementation supports the _POSIX_V6_LP64_OFF64 programming environment and the application is being built in the
|
|
_POSIX_V6_LP64_OFF64 programming environment.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The implementation supports the _POSIX_V6_LPBIG_OFFBIG programming environment and the application is being built in the
|
|
_POSIX_V6_LPBIG_OFFBIG programming environment. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>All other types of this form are optional.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Minimum-width integer types</p>
|
|
|
|
<p>The <b>typedef</b> name <b>int_least</b> <i>N</i> <b>_t</b> designates a signed integer type with a width of at least <i>N</i>,
|
|
such that no signed integer type with lesser size has at least the specified width. Thus, <b>int_least32_t</b> denotes a signed
|
|
integer type with a width of at least 32 bits.</p>
|
|
|
|
<p>The <b>typedef</b> name <b>uint_least</b> <i>N</i> <b>_t</b> designates an unsigned integer type with a width of at least
|
|
<i>N</i>, such that no unsigned integer type with lesser size has at least the specified width. Thus, <b>uint_least16_t</b> denotes
|
|
an unsigned integer type with a width of at least 16 bits.</p>
|
|
|
|
<p>The following types are required: <b>int_least8_t</b> <b>int_least16_t</b> <b>int_least32_t</b> <b>int_least64_t</b>
|
|
<b>uint_least8_t</b> <b>uint_least16_t</b> <b>uint_least32_t</b> <b>uint_least64_t</b></p>
|
|
|
|
<p>All other types of this form are optional.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Fastest minimum-width integer types</p>
|
|
|
|
<p>Each of the following types designates an integer type that is usually fastest to operate with among all integer types that have
|
|
at least the specified width.</p>
|
|
|
|
<p>The designated type is not guaranteed to be fastest for all purposes; if the implementation has no clear grounds for choosing
|
|
one type over another, it will simply pick some integer type satisfying the signedness and width requirements.</p>
|
|
|
|
<p>The <b>typedef</b> name <b>int_fast</b> <i>N</i> <b>_t</b> designates the fastest signed integer type with a width of at least
|
|
<i>N</i>. The <b>typedef</b> name <b>uint_fast</b> <i>N</i> <b>_t</b> designates the fastest unsigned integer type with a width of
|
|
at least <i>N</i>.</p>
|
|
|
|
<p>The following types are required: <b>int_fast8_t</b> <b>int_fast16_t</b> <b>int_fast32_t</b> <b>int_fast64_t</b>
|
|
<b>uint_fast8_t</b> <b>uint_fast16_t</b> <b>uint_fast32_t</b> <b>uint_fast64_t</b></p>
|
|
|
|
<p>All other types of this form are optional.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Integer types capable of holding object pointers</p>
|
|
|
|
<p>The following type designates a signed integer type with the property that any valid pointer to <b>void</b> can be converted to
|
|
this type, then converted back to a pointer to <b>void</b>, and the result will compare equal to the original pointer:
|
|
<b>intptr_t</b></p>
|
|
|
|
<p>The following type designates an unsigned integer type with the property that any valid pointer to <b>void</b> can be converted
|
|
to this type, then converted back to a pointer to <b>void</b>, and the result will compare equal to the original pointer:
|
|
<b>uintptr_t</b></p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
On XSI-conformant systems, the <b>intptr_t</b> and <b>uintptr_t</b> types are required; <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"> otherwise, they are optional.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Greatest-width integer types</p>
|
|
|
|
<p>The following type designates a signed integer type capable of representing any value of any signed integer type:
|
|
<b>intmax_t</b></p>
|
|
|
|
<p>The following type designates an unsigned integer type capable of representing any value of any unsigned integer type:
|
|
<b>uintmax_t</b></p>
|
|
|
|
<p>These types are required.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<basefont size="2">
|
|
|
|
<dl>
|
|
<dt><b>Note:</b></dt>
|
|
|
|
<dd>Applications can test for optional types by using the corresponding limit macro from <a href="#tag_13_48_03_02">Limits of
|
|
Specified-Width Integer Types</a> .</dd>
|
|
</dl>
|
|
|
|
<basefont size="3">
|
|
|
|
<h5><a name="tag_13_48_03_02"></a>Limits of Specified-Width Integer Types</h5>
|
|
|
|
<p>The following macros specify the minimum and maximum limits of the types declared in the <i><stdint.h></i> header. Each
|
|
macro name corresponds to a similar type name in <a href="#tag_13_48_03_01">Integer Types</a> .</p>
|
|
|
|
<p>Each instance of any defined macro shall be replaced by a constant expression suitable for use in <b>#if</b> preprocessing
|
|
directives, and this expression shall have the same type as would an expression that is an object of the corresponding type
|
|
converted according to the integer promotions. Its implementation-defined value shall be equal to or greater in magnitude (absolute
|
|
value) than the corresponding value given below, with the same sign, except where stated to be exactly the given value.</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Limits of exact-width integer types</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Minimum values of exact-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT<i>N</i>_MIN}</dt>
|
|
|
|
<dd>Exactly -(2 <small><sup>N-1</sup></small>)</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of exact-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT<i>N</i>_MAX}</dt>
|
|
|
|
<dd>Exactly 2<small><sup>N-1</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of exact-width unsigned integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{UINT<i>N</i>_MAX}</dt>
|
|
|
|
<dd>Exactly 2 <small><sup>N</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of minimum-width integer types</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Minimum values of minimum-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT_LEAST<i>N</i>_MIN}</dt>
|
|
|
|
<dd>-(2 <small><sup> N-1</sup></small> -1)</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of minimum-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT_LEAST<i>N</i>_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> N-1</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of minimum-width unsigned integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{UINT_LEAST<i>N</i>_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> N</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of fastest minimum-width integer types</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Minimum values of fastest minimum-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT_FAST<i>N</i>_MIN}</dt>
|
|
|
|
<dd>-(2 <small><sup> N-1</sup></small> -1)</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of fastest minimum-width signed integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INT_FAST<i>N</i>_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> N-1</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum values of fastest minimum-width unsigned integer types:</p>
|
|
|
|
<dl compact>
|
|
<dt>{UINT_FAST<i>N</i>_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> N</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of integer types capable of holding object pointers</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Minimum value of pointer-holding signed integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INTPTR_MIN}</dt>
|
|
|
|
<dd>-(2 <small><sup> 15</sup></small> -1)</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum value of pointer-holding signed integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INTPTR_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> 15</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum value of pointer-holding unsigned integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{UINTPTR_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> 16</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of greatest-width integer types</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Minimum value of greatest-width signed integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INTMAX_MIN}</dt>
|
|
|
|
<dd>-(2 <small><sup> 63</sup></small> -1)</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum value of greatest-width signed integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{INTMAX_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> 63</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Maximum value of greatest-width unsigned integer type:</p>
|
|
|
|
<dl compact>
|
|
<dt>{UINTMAX_MAX}</dt>
|
|
|
|
<dd>2 <small><sup> 64</sup></small> -1</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h5><a name="tag_13_48_03_03"></a>Limits of Other Integer Types</h5>
|
|
|
|
<p>The following macros specify the minimum and maximum limits of integer types corresponding to types defined in other standard
|
|
headers.</p>
|
|
|
|
<p>Each instance of these macros shall be replaced by a constant expression suitable for use in <b>#if</b> preprocessing
|
|
directives, and this expression shall have the same type as would an expression that is an object of the corresponding type
|
|
converted according to the integer promotions. Its implementation-defined value shall be equal to or greater in magnitude (absolute
|
|
value) than the corresponding value given below, with the same sign.</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Limits of <b>ptrdiff_t</b>:</p>
|
|
|
|
<dl compact>
|
|
<dt>{PTRDIFF_MIN}</dt>
|
|
|
|
<dd>-65535</dd>
|
|
|
|
<dt>{PTRDIFF_MAX}</dt>
|
|
|
|
<dd>+65535</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of <b>sig_atomic_t</b>:</p>
|
|
|
|
<dl compact>
|
|
<dt>{SIG_ATOMIC_MIN}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
|
|
<dt>{SIG_ATOMIC_MAX}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limit of <b>size_t</b>:</p>
|
|
|
|
<dl compact>
|
|
<dt>{SIZE_MAX}</dt>
|
|
|
|
<dd>65535</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of <b>wchar_t</b>:</p>
|
|
|
|
<dl compact>
|
|
<dt>{WCHAR_MIN}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
|
|
<dt>{WCHAR_MAX}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
</dl>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Limits of <b>wint_t</b>:</p>
|
|
|
|
<dl compact>
|
|
<dt>{WINT_MIN}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
|
|
<dt>{WINT_MAX}</dt>
|
|
|
|
<dd>See below.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>If <b>sig_atomic_t</b> (see the <a href="../basedefs/signal.h.html"><i><signal.h></i></a> header) is defined as a signed
|
|
integer type, the value of {SIG_ATOMIC_MIN} shall be no greater than -127 and the value of {SIG_ATOMIC_MAX} shall be no less than
|
|
127; otherwise, <b>sig_atomic_t</b> shall be defined as an unsigned integer type, and the value of {SIG_ATOMIC_MIN} shall be 0 and
|
|
the value of {SIG_ATOMIC_MAX} shall be no less than 255.</p>
|
|
|
|
<p>If <b>wchar_t</b> (see the <a href="../basedefs/stddef.h.html"><i><stddef.h></i></a> header) is defined as a signed
|
|
integer type, the value of {WCHAR_MIN} shall be no greater than -127 and the value of {WCHAR_MAX} shall be no less than 127;
|
|
otherwise, <b>wchar_t</b> shall be defined as an unsigned integer type, and the value of {WCHAR_MIN} shall be 0 and the value of
|
|
{WCHAR_MAX} shall be no less than 255.</p>
|
|
|
|
<p>If <b>wint_t</b> (see the <a href="../basedefs/wchar.h.html"><i><wchar.h></i></a> header) is defined as a signed integer
|
|
type, the value of {WINT_MIN} shall be no greater than -32767 and the value of {WINT_MAX} shall be no less than 32767; otherwise,
|
|
<b>wint_t</b> shall be defined as an unsigned integer type, and the value of {WINT_MIN} shall be 0 and the value of {WINT_MAX}
|
|
shall be no less than 65535.</p>
|
|
|
|
<h5><a name="tag_13_48_03_04"></a>Macros for Integer Constant Expressions</h5>
|
|
|
|
<p>The following macros expand to integer constant expressions suitable for initializing objects that have integer types
|
|
corresponding to types defined in the <i><stdint.h></i> header. Each macro name corresponds to a similar type name listed
|
|
under <i>Minimum-width integer types</i> and <i>Greatest-width integer types</i>.</p>
|
|
|
|
<p>Each invocation of one of these macros shall expand to an integer constant expression suitable for use in <b>#if</b>
|
|
preprocessing directives. The type of the expression shall have the same type as would an expression that is an object of the
|
|
corresponding type converted according to the integer promotions. The value of the expression shall be that of the argument.</p>
|
|
|
|
<p>The argument in any instance of these macros shall be a decimal, octal, or hexadecimal constant with a value that does not
|
|
exceed the limits for the corresponding type.</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Macros for minimum-width integer constant expressions</p>
|
|
|
|
<p>The macro <i>INTN_C</i>( <i>value</i>) shall expand to an integer constant expression corresponding to the type <b>int_least</b>
|
|
<i>N</i> <b>_t</b>. The macro <i>UINTN_C</i>( <i>value</i>) shall expand to an integer constant expression corresponding to the
|
|
type <b>uint_least</b> <i>N</i> <b>_t</b>. For example, if <b>uint_least64_t</b> is a name for the type <b>unsigned long long</b>,
|
|
then <i>UINT64_C</i>(0x123) might expand to the integer constant 0x123ULL.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Macros for greatest-width integer constant expressions</p>
|
|
|
|
<p>The following macro expands to an integer constant expression having the value specified by its argument and the type
|
|
<b>intmax_t</b>: INTMAX_C(<i>value</i>)</p>
|
|
|
|
<p>The following macro expands to an integer constant expression having the value specified by its argument and the type
|
|
<b>uintmax_t</b>: UINTMAX_C(<i>value</i>)</p>
|
|
</li>
|
|
</ul>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_13_48_04"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_48_05"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i><stdint.h></i> header is a subset of the <a href="../basedefs/inttypes.h.html"><i><inttypes.h></i></a> header
|
|
more suitable for use in freestanding environments, which might not support the formatted I/O functions. In some environments, if
|
|
the formatted conversion support is not wanted, using this header instead of the <a href=
|
|
"../basedefs/inttypes.h.html"><i><inttypes.h></i></a> header avoids defining such a large number of macros.</p>
|
|
|
|
<p>As a consequence of adding <b>int8_t</b>, the following are true:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>A byte is exactly 8 bits.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>{CHAR_BIT} has the value 8, {SCHAR_MAX} has the value 127, {SCHAR_MIN} has the value -127 or -128, and {UCHAR_MAX} has the value
|
|
255.</p>
|
|
</li>
|
|
</ul>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_48_06"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p><b>typedef</b> names beginning with <b>int</b> or <b>uint</b> and ending with _t may be added to the types defined in the
|
|
<i><stdint.h></i> header. Macro names beginning with INT or UINT and ending with _MAX, _MIN, or _C may be added to the macros
|
|
defined in the <i><stdint.h></i> header.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_48_07"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="inttypes.h.html"><i><inttypes.h></i></a> , <a href="signal.h.html"><i><signal.h></i></a> , <a href=
|
|
"stddef.h.html"><i><stddef.h></i></a> , <a href="wchar.h.html"><i><wchar.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_13_48_08"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 6. Included for alignment with the ISO/IEC 9899:1999 standard.</p>
|
|
|
|
<p>ISO/IEC 9899:1999 standard, Technical Corrigendum No. 1 is incorporated.<br>
|
|
</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|