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