Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

stdint(5)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

stdint — integer types

SYNOPSIS

#include <stdint.h>

DESCRIPTION

This header file defines sets of integer types having specified widths and corresponding sets of macros. It also defines macros that specify limits of integer types corresponding to types defined in other standard headers.

Since not all implementations are required to support all of the integer sizes defined in this manual page, the proper way to see if a particular size of an integer is supported on the current implementation is to test the symbol that defines its maximum value. For example, if #ifdef UINT64_MAX tests false, then that implementation does not support 64-bit unsigned signed integers.

This header file defines the following integer data types for 8, 16, 32, and 64 bits.

intmax_t

largest signed integer data type supported by implementation

int8_t

8-bit signed integer

int16_t

16-bit signed integer

int32_t

32-bit signed integer

int64_t

64-bit signed integer

uintmax_t

largest unsigned integer data type supported by implementation

uint8_t

8-bit unsigned integer

uint16_t

16-bit unsigned integer

uint32_t

32-bit unsigned integer

uint64_t

64-bit unsigned integer

The following two data types are signed and unsigned integer data types that are large enough to hold a pointer. A pointer can be moved to or from these data types without corruption.

intptr_t

signed integer type that is large enough to hold a pointer

uintptr_t

unsigned integer type that is large enough to hold a pointer

This header file defines the following integer data types for determining the most efficient data types to use for integer values on a particular implementation.

intfast_t

most efficient signed integer data type supported by implementation

int_fast8_t

most efficient signed integer of at least 8 bits

int_fast16_t

most efficient signed integer of at least 16 bits

int_fast32_t

most efficient signed integer of at least 32 bits

int_fast64_t

most efficient signed integer of at least 64 bits

uintfast_t

most efficient unsigned integer data type supported by implementation

uint_fast8_t

most efficient unsigned integer of at least 8 bits

uint_fast16_t

most efficient unsigned integer of at least 16 bits

uint_fast32_t

most efficient unsigned integer of at least 32 bits

uint_fast64_t

most efficient unsigned integer of at least 64 bits

This header file defines the following integer data types for compatibility with systems that do not fit the 16-bit or 32-bit word size model. These data types define the signed and unsigned integers of at least 8, 16, 32, and 64 bits.

int_least8_t

smallest signed integer of at least 8 bits

int_least16_t

smallest signed integer of at least 16 bits

int_least32_t

smallest signed integer of at least 32 bits

int_least64_t

smallest signed integer of at least 64 bits

uint_least8_t

smallest unsigned integer of at least 8 bits

uint_least16_t

smallest unsigned integer of at least 16 bits

uint_least32_t

smallest unsigned integer of at least 32 bits

uint_least64_t

smallest unsigned integer of at least 64 bits

The following macros define the minimum and maximum values that can be stored in the above data types.

INTMAX_MIN

minimum value that can be stored in the largest integer data type

INTMAX_MAX

maximum value that can be stored in the largest signed integer data type

UINTMAX_MAX

maximum value that can be stored in the largest unsigned integer data type

INTFAST_MIN

minimum value that can be stored in the most efficient integer data type

INTFAST_MAX

maximum value that can be stored in the most efficient signed integer data type

UINTFAST_MAX

maximum value that can be stored in the most efficient unsigned integer data type

INT8_MIN

minimum value that can be stored in an int8_t data type

INT16_MIN

minimum value that can be stored in an int16_t data type

INT32_MIN

minimum value that can be stored in an int32_t data type

INT64_MIN

minimum value that can be stored in an int64_t data type

INT8_MAX

maximum value that can be stored in an int8_t data type

INT16_MAX

maximum value that can be stored in an int16_t data type

INT32_MAX

maximum value that can be stored in an int32_t data type

INT64_MAX

maximum value that can be stored in an int64_t data type

UINT8_MAX

maximum value that can be stored in an uint8_t data type

UINT16_MAX

maximum value that can be stored in an uint16_t data type

UINT32_MAX

maximum value that can be stored in an uint32_t data type

UINT64_MAX

maximum value that can be stored in an uint64_t data type"

INT_FAST8_MIN

minimum value that can be stored in an int_fast8_t data type

INT_FAST16_MIN

minimum value that can be stored in an int_fast16_t data type"

INT_FAST32_MIN

minimum value that can be stored in an int_fast32_t data type

INT_FAST64_MIN

minimum value that can be stored in an int_fast64_t data type

INT_FAST8_MAX

maximum value that can be stored in an int_fast8_t data type

INT_FAST16_MAX

maximum value that can be stored in an int_fast16_t data type

INT_FAST32_MAX

maximum value that can be stored in an int_fast32_t data type

INT_FAST64_MAX

maximum value that can be stored in an int_fast64_t data type

INT_LEAST8_MIN

minimum value that can be stored in an int_least8_t data type

INT_LEAST16_MIN

minimum value that can be stored in an int_least16_t data type

INT_LEAST32_MIN

minimum value that can be stored in an int_least_32_t data type

INT_LEAST64_MIN

minimum value that can be stored in an int_least_64_t data type

INT_LEAST8_MAX

maximum value that can be stored in an int_least8_t data type

INT_LEAST16_MAX

maximum value that can be stored in an int_least16_t data type

INT_LEAST32_MAX

maximum value that can be stored in an int_least_32_t data type

INT_LEAST64_MAX

maximum value that can be stored in an int_least_64_t data type

The following macros specify the maximum and minimum limits of integer types corresponding to types defined in other standard headers. All these values are implementation defined.

PTRDIFF_MIN

minimum value that can be stored in ptrdiff_t data type

PTRDIFF_MAX

maximum value that can be stored in ptrdiff_t data type

SIG_ATOMIC_MIN

minimum value that can be stored in sig_atomic_t data type

SIG_ATOMIC_MAX

maximum value that can be stored in sig_atomic_t data type

SIZE_MAX

maximum value that can be stored in size_t data type

WCHAR_MIN

minimum value that can be stored in wchar_t data type

WCHAR_MAX

maximum value that can be stored in wchar_t data type

WINT_MIN

minimum value that can be stored in wint_t data type

WINT_MAX

maximum value that can be stored in wint_t data type

The following macros expand to integer constant expressions suitable for initializing objects that have integer types corresponding to types defined in <stdint.h> header.

Macros For Minimum-Width Integer Constant Expressions

The macro INTN_C(value) expands to an integer constant expression corresponding to the type int_leastN_t.

The macro UINTN_C(value) expands to an integer constant expression corresponding to the type uint_leastN_t. For example, if uint_least64_t is a name for the type unsigned long long, then UINT64_C(0x123) might expand to the integer constant 0x123ULL.

Macros For Greatest-Width Integer Constant Expressions

The following macro expands to an integer constant expression having the value specified by its argument and the type intmax_t: INTMAX_C(value)

The following macro expands to an integer constant expression having the value specified by its argument and the type uintmax_t: UINTMAX_C(value).

FILES

/usr/include/stdint.h

SEE ALSO

inttypes(5), standards(5), <stddef.h>, <wchar.h>, <signal.h>.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.