Movatterモバイル変換


[0]ホーム

URL:


Skip Navigation Links
Exit Print View
Link to oracle.comman pages section 3: Library Interfaces and Headers    Oracle Solaris 11 Information Library
Oracle Technology Network
Library
PDF
Print View
Feedback
search filter icon
search icon
 Search Scope:

Document Information

Preface

Introduction

Library Interfaces and Headers

acct(3HEAD)

acct.h(3HEAD)

aio(3HEAD)

aio.h(3HEAD)

ar(3HEAD)

archives(3HEAD)

archives.h(3HEAD)

ar.h(3HEAD)

assert(3HEAD)

assert.h(3HEAD)

complex(3HEAD)

complex.h(3HEAD)

cpio(3HEAD)

cpio.h(3HEAD)

dirent(3HEAD)

dirent.h(3HEAD)

errno(3HEAD)

errno.h(3HEAD)

fcntl(3HEAD)

fcntl.h(3HEAD)

fenv(3HEAD)

fenv.h(3HEAD)

float(3HEAD)

float.h(3HEAD)

floatingpoint(3HEAD)

floatingpoint.h(3HEAD)

fmtmsg(3HEAD)

fmtmsg.h(3HEAD)

fnmatch(3HEAD)

fnmatch.h(3HEAD)

ftw(3HEAD)

ftw.h(3HEAD)

glob(3HEAD)

glob.h(3HEAD)

grp(3HEAD)

grp.h(3HEAD)

iconv(3HEAD)

iconv.h(3HEAD)

if(3HEAD)

if.h(3HEAD)

in(3HEAD)

inet(3HEAD)

inet.h(3HEAD)

in.h(3HEAD)

inttypes(3HEAD)

inttypes.h(3HEAD)

ipc(3HEAD)

ipc.h(3HEAD)

iso646(3HEAD)

iso646.h(3HEAD)

langinfo(3HEAD)

langinfo.h(3HEAD)

lib300(3LIB)

lib300s(3LIB)

lib4014(3LIB)

lib450(3LIB)

libadm(3LIB)

libaio(3LIB)

libauto_ef(3LIB)

libbsdmalloc(3LIB)

libc(3LIB)

libc_db(3LIB)

libcfgadm(3LIB)

libcommputil(3LIB)

libcontract(3LIB)

libcpc(3LIB)

libcrypt(3LIB)

libcurses(3LIB)

libdat(3LIB)

libdevid(3LIB)

libdevinfo(3LIB)

libdl(3LIB)

libdlpi(3LIB)

libdns_sd(3LIB)

libdoor(3LIB)

libdtrace(3LIB)

libefi(3LIB)

libelf(3LIB)

libexacct(3LIB)

libfcoe(3LIB)

libfmevent(3LIB)

libform(3LIB)

libfstyp(3LIB)

libgen(3HEAD)

libgen(3LIB)

libgen.h(3HEAD)

libgss(3LIB)

libhbaapi(3LIB)

libidnkit(3LIB)

libilb(3LIB)

libintl(3HEAD)

libintl(3LIB)

libintl.h(3HEAD)

libiscsit(3LIB)

libkmf(3LIB)

libkrb5(3LIB)

libkstat(3LIB)

libkvm(3LIB)

libl(3LIB)

liblayout(3LIB)

liblgrp(3LIB)

libm(3LIB)

libmail(3LIB)

libmalloc(3LIB)

libmapmalloc(3LIB)

libmd(3LIB)

libmd5(3LIB)

libmenu(3LIB)

libmlib(3LIB)

libmlib_mt(3LIB)

libmp(3LIB)

libMPAPI(3LIB)

libmpapi(3LIB)

libmtmalloc(3LIB)

libmvec(3LIB)

libnsl(3LIB)

libnvpair(3LIB)

libpam(3LIB)

libpanel(3LIB)

libpapi(3LIB)

libpctx(3LIB)

libpicl(3LIB)

libpicltree(3LIB)

libpkcs11(3LIB)

libplot(3LIB)

libpool(3LIB)

libposix4(3LIB)

libproject(3LIB)

libpthread(3LIB)

libreparse(3LIB)

libresolv(3LIB)

librpcsvc(3LIB)

librt(3LIB)

librtld_db(3LIB)

libsasl(3LIB)

libscf(3LIB)

libsctp(3LIB)

libsec(3LIB)

libsecdb(3LIB)

libsendfile(3LIB)

libsip(3LIB)

libslp(3LIB)

libSMHBAAPI(3LIB)

libsmhbaapi(3LIB)

libsocket(3LIB)

libsrpt(3LIB)

libssagent(3LIB)

libssasnmp(3LIB)

libstmf(3LIB)

libsys(3LIB)

libsysevent(3LIB)

libtecla(3LIB)

libtermcap(3LIB)

libtermlib(3LIB)

libthread(3LIB)

libtsalarm(3LIB)

libtsnet(3LIB)

libtsol(3LIB)

libumem(3LIB)

libusb(3LIB)

libuuid(3LIB)

libv12n(3LIB)

libvolmgt(3LIB)

libvt0(3LIB)

libw(3LIB)

libwsreg(3LIB)

libxnet(3LIB)

libXtsol(3LIB)

libxtsol(3LIB)

liby(3LIB)

libzonestat(3LIB)

limits(3HEAD)

limits.h(3HEAD)

locale(3HEAD)

locale.h(3HEAD)

math(3HEAD)

math.h(3HEAD)

mman(3HEAD)

mman.h(3HEAD)

monetary(3HEAD)

monetary.h(3HEAD)

mqueue(3HEAD)

mqueue.h(3HEAD)

msg(3HEAD)

msg.h(3HEAD)

ndbm(3HEAD)

ndbm.h(3HEAD)

netdb(3HEAD)

netdb.h(3HEAD)

nl_types(3HEAD)

nl_types.h(3HEAD)

paths(3HEAD)

paths.h(3HEAD)

poll(3HEAD)

poll.h(3HEAD)

pthread(3HEAD)

pthread.h(3HEAD)

pwd(3HEAD)

pwd.h(3HEAD)

regex(3HEAD)

regex.h(3HEAD)

resource(3HEAD)

resource.h(3HEAD)

sched(3HEAD)

sched.h(3HEAD)

search(3HEAD)

search.h(3HEAD)

select(3HEAD)

select.h(3HEAD)

sem(3HEAD)

semaphore(3HEAD)

semaphore.h(3HEAD)

sem.h(3HEAD)

setjmp(3HEAD)

setjmp.h(3HEAD)

shm(3HEAD)

shm.h(3HEAD)

siginfo(3HEAD)

siginfo.h(3HEAD)

signal(3HEAD)

signal.h(3HEAD)

SMHBA_GetAdapterAttributes(3LIB)

SMHBA_GetAdapterPortAttributes(3LIB)

SMHBA_GetBindingCapability(3LIB)

SMHBA_GetBindingSupport(3LIB)

SMHBA_GetDiscoveredPortAttributes(3LIB)

SMHBA_GetFCPhyAttributes(3LIB)

SMHBA_GetLUNStatistics(3LIB)

SMHBA_GetNumberofPorts(3LIB)

SMHBA_GetPersistentBinding(3LIB)

SMHBA_GetPhyStatistics(3LIB)

SMHBA_GetPortAttributesByWWN(3LIB)

SMHBA_GetPortType(3LIB)

SMHBA_GetProtocolStatistics(3LIB)

SMHBA_GetSASPhyAttributes(3LIB)

SMHBA_GetTargetMapping(3LIB)

SMHBA_GetVendorLibraryAttributes(3LIB)

SMHBA_GetVersion(3LIB)

SMHBA_GetWrapperLibraryAttributes(3LIB)

SMHBA_RegisterForAdapterAddEvents(3LIB)

SMHBA_RegisterForAdapterEvents(3LIB)

SMHBA_RegisterForAdapterPhyStatEvents(3LIB)

SMHBA_RegisterForAdapterPortEvents(3LIB)

SMHBA_RegisterForAdapterPortStatEvents(3LIB)

SMHBA_RegisterForTargetEvents(3LIB)

SMHBA_RegisterLibrary(3LIB)

SMHBA_RemoveAllPersistentBindings(3LIB)

SMHBA_RemovePersistentBinding(3LIB)

SMHBA_ScsiInquiry(3LIB)

SMHBA_ScsiReadCapacity(3LIB)

SMHBA_ScsiReportLuns(3LIB)

SMHBA_SendECHO(3LIB)

SMHBA_SendSMPPassThru(3LIB)

SMHBA_SendTEST(3LIB)

SMHBA_SetBindingSupport(3LIB)

SMHBA_SetPersistentBinding(3LIB)

socket(3HEAD)

socket.h(3HEAD)

spawn(3HEAD)

spawn.h(3HEAD)

stat(3HEAD)

stat.h(3HEAD)

statvfs(3HEAD)

statvfs.h(3HEAD)

stdbool(3HEAD)

stdbool.h(3HEAD)

stddef(3HEAD)

stddef.h(3HEAD)

stdint(3HEAD)

stdint.h(3HEAD)

stdio(3HEAD)

stdio.h(3HEAD)

stdlib(3HEAD)

stdlib.h(3HEAD)

string(3HEAD)

string.h(3HEAD)

strings(3HEAD)

strings.h(3HEAD)

stropts(3HEAD)

stropts.h(3HEAD)

syslog(3HEAD)

syslog.h(3HEAD)

tar(3HEAD)

tar.h(3HEAD)

tcp(3HEAD)

tcp.h(3HEAD)

termios(3HEAD)

termios.h(3HEAD)

tgmath(3HEAD)

tgmath.h(3HEAD)

time(3HEAD)

timeb(3HEAD)

timeb.h(3HEAD)

time.h(3HEAD)

times(3HEAD)

times.h(3HEAD)

types32(3HEAD)

types32.h(3HEAD)

types(3HEAD)

types.h(3HEAD)

ucontext(3HEAD)

ucontext.h(3HEAD)

uio(3HEAD)

uio.h(3HEAD)

ulimit(3HEAD)

ulimit.h(3HEAD)

un(3HEAD)

un.h(3HEAD)

unistd(3HEAD)

unistd.h(3HEAD)

utime(3HEAD)

utime.h(3HEAD)

utmpx(3HEAD)

utmpx.h(3HEAD)

utsname(3HEAD)

utsname.h(3HEAD)

values(3HEAD)

values.h(3HEAD)

wait(3HEAD)

wait.h(3HEAD)

wchar(3HEAD)

wchar.h(3HEAD)

wctype(3HEAD)

wctype.h(3HEAD)

wordexp(3HEAD)

wordexp.h(3HEAD)

stdint.h

, stdint

- integer types

Synopsis

#include <stdint.h>

Description

The <stdint.h> header declares sets of integer types having specified widths, anddefines corresponding sets of macros. It also defines macros that specify limitsof integer types corresponding to types defined in other standard headers.

The ``width'' of an integer type is the number of bits usedto store its value in a pure binary system; the actual typecan use more bits than that (for example, a 28-bit type couldbe stored in 32 bits of actual storage). An N-bit signed typehas values in the range -2N-1 or 1-2N-1 to 2N-1-1, while an N-bitunsigned type has values in the range 0 to 2N-1.

Types are defined in the following categories:

Some of these types may denote the same type.

Corresponding macros specify limits of the declared types and construct suitable constants.

For each type described herein that the implementation provides, the <stdint.h> headerdeclares thattypedef name and defines the associated macros. Conversely, for eachtype described herein that the implementation does not provide, the <stdint.h> headerdoes not declare thattypedef name, nor does it define the associatedmacros. An implementation provides those types described as required, but need notprovide any of the others (described as optional).

Integer Types

Whentypedef names differing only in the absence or presence of theinitialu are defined, they denote corresponding signed and unsigned types asdescribed in the ISO/IEC 9899: 1999 standard, Section 6.2.5; an implementation providingone of these corresponding types must also provide the other.

In the following descriptions, the symbolN represents an unsigned decimal integerwith no leading zeros (for example, 8 or 24, but not 04or 048).

Exact-width integer types

Thetypedef nameintN_t designates a signed integer type with widthN, no padding bits, and a two's-complement representation. Thus,int8_t denotes a signed integer type with a width of exactly 8 bits.

The typedef nameuintN_t designates an unsigned integer type with widthN. Thus,uint24_t denotes an unsigned integer type with a width of exactly 24 bits.

The following types are required:

int8_tint16_tint32_tuint8_tuint16_tuint32_t

If an implementation provides integer types with width 64 that meet these requirements, then the following types are required:

int64_tuint64_t

In particular, this is the case if any of the following are true:

  • The implementation supports the_POSIX_V6_ILP32_OFFBIG programming environment and the application is being built in the_POSI X_V6_ILP32_OFFBIG programming environment (see the Shell and Utilities volume of IEEE Std 1003.1-200x, c99, Programming Environments).

  • The implementation supports the_POSIX_V6_LP64_OFF64 programming environment and the application is being built in the_POSIX_ V6_LP64_OFF64 programming environment.

  • The implementation supports the_POSIX_V6_LPBIG_OFFBIG programming environment and the application is being built in the_POSIX_V6_LPBIG_OFFBIG programming environment.

All other types of this form are optional.

Minimum-width integer types

Thetypedef nameint_leastN_t designates a signed integer type with a width of at leastN, such that no signed integer type with lesser size has at least the specified width. Thus,int_least32 _t denotes a signed integer type with a width of at least 32 bits.

Thetypedef nameuint_leastN_t designates an unsigned integer type with a width of at leastN, such that no unsigned integer type with lesser size has at least the specified width. Thus,uint_ least16_t denotes an unsigned integer type with a width of at least 16 bits.

The following types are required:

int_least8_tint_least16_tint_least32_tint_least64_tuint_least8_tuint_least16_tuint_least32_tuint_least64_t

All other types of this form are optional.

Fastest minimum-width integer types

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.

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.

Thetypedef nameint_fastN_t designates the fastest signed integer type with a width of at leastN. Thetypedef nameuint_fastN_ t designates the fastest unsigned integer type with a width of at leastN.

The following types are required:

int_fast8_tint_fast16_tint_fast32_tint_fast64_tuint_fast8_tuint_fast16_tuint_fast32_tuint_fast64_t

All other types of this form are optional.

Integer types capable of holding object pointers
intptr_t

Designates a signed integer type with the property that any valid pointer to void can be converted to this type, then converted back to a pointer to void, and the result will compare equal to the original pointer.

uintptr_t

Designates an unsigned integer type with the property that any valid pointer to void can be converted to this type, then converted back to a pointer to void, and the result will compare equal to the original pointer.

On standard-conforming systems, theintptr_t anduintptr_t types are required; otherwise, they are optional.

Greatest-width integer types
intmax_t

Designates a signed integer type capable of representing any value of any signed integer type.

uintmax_t

Designates an unsigned integer type capable of representing any value of any unsigned integer type.

These types are required.

Applications can test for optional types by using the corresponding limit macro fromLimits of Specified-Width Integer Types.

Limits of Specified-Width Integer Types

The following macros specify the minimum and maximum limits of the typesdeclared in the <stdint.h> header. Each macro name corresponds to a similartype name inInteger Types.

Each instance of any defined macro is replaced by a constant expressionsuitable for use in#if preprocessing directives. This expression has the sametype as would an expression that is an object of the correspondingtype converted according to the integer promotions. Its implementation-defined value is equal toor greater in magnitude (absolute value) than the corresponding value givenbelow, with the same sign, except where stated to be exactly thegiven value.

Limits of exact-width integer types
  • Minimum values of exact-width signed integer types:

    {INTN_MIN}

    Exactly -(2N-1)

  • Maximum values of exact-width signed integer types:

    {INTN_MAX}

    Exactly 2N-1 -1

  • Maximum values of exact-width unsigned integer types:

    {UINTN_MAX}

    Exactly 2N -1

Limits of minimum-width integer types
  • Minimum values of minimum-width signed integer types:

    {INT_LEASTN_MIN}

    -(2N-1 -1)

  • Maximum values of minimum-width signed integer types:

    {INT_LEASTN_MAX}

    2N-1 -1

  • Maximum values of minimum-width unsigned integer types:

    {UINT_LEASTN_MAX}

    2N -1

Limits of fastest minimum-width integer types
  • Minimum values of fastest minimum-width signed integer types:

    {INT_FASTN_MIN}

    -(2N-1 -1)

  • Maximum values of fastest minimum-width signed integer types:

    {INT_FASTN_MAX}

    2N-1 -1

  • Maximum values of fastest minimum-width unsigned integer types:

    {UINT_FASTN_MAX}

    2N-1 -1

Limits of integer types capable of holding object pointers
  • Minimum value of pointer-holding signed integer type:

    {INTPTR_MIN}

    -(215 -1)

  • Maximum value of pointer-holding signed integer type:

    {INTPTR_MAX}

    215 -1

  • Minimum value of pointer-holding signed integer type:

    {UINTPTR_MAX}

    216 -1

Limits of greatest-width integer types
  • Minimum value of greatest-width signed integer type:

    {INTMAX_MIN}

    -(263 -1)

  • Maximum value of greatest-width signed integer type:

    {INTMAX_MIN}

    263 -1

  • Maximum value of greatest-width unsigned integer type:

    {UINTMAX_MIN}

    264 -1

Limits of Other Integer Types

The following macros specify the minimum and maximum limits of integer typescorresponding to types defined in other standard headers.

Each instance of these macros is replaced by a constant expression suitablefor use in#if preprocessing directives. This expression has the same typeas would an expression that is an object of the corresponding typeconverted according to the integer promotions. Its implementation-defined value is equal to orgreater in magnitude (absolute value) than the corresponding value given below, withthe same sign.

Limits ofptrdiff_t:
{PTRDIFF_MIN}

-65535

{PTRDIFF_MAX}

+65535

Limits ofsig_atomic_t:
{SIG_ATOMIC_MIN}

See below.

{SIG_ATOMIC_MAX}

See below.

Limits ofsize_t:
{SIZE_MAX}

65535

Limits ofwchar_t:
{WCHAR_MIN}

See below.

{WCHAR_MAX}

See below.

Limits ofwint_t:
{WINT_MIN}

See below.

{WINT_MAX}

See below.

Ifsig_atomic_t (see the <signal.h> header) is defined as a signed integertype, the value of {SIG_ATOMIC_MIN} is no greater than -127 and thevalue of {SIG_ATOMIC_MAX} is no less than 127. Otherwise,sig_atomic_t is definedas an unsigned integer type, the value of {SIG_ATOMIC_MIN} is 0, andthe value of {SIG_ATOMIC_MAX} is no less than 255.

Ifwchar_t (see the <stddef.h> header) is defined as a signed integertype, the value of {WCHAR_MIN} is no greater than -127 and the value of {WCHAR_MAX} is no less than 127. Otherwise,wchar_t is definedas an unsigned integer type, and the value of {WCHAR_MIN} is 0and the value of {WCHAR_MAX} is no less than 255.

Ifwint_t (see the <wchar.h> header) is defined as a signed integertype, the value of {WINT_MIN} is no greater than -32767 and thevalue of {WINT_MAX} is no less than 32767. Otherwise,wint_t is defined asan unsigned integer type, and the value of {WINT_MIN} is 0 andthe value of {WINT_MAX} is no less than 65535.

Macros for Integer Constant Expressions

The following macros expand to integer constant expressions suitable for initializing objectsthat have integer types corresponding to types defined in the <stdint.h> header.Each macro name corresponds to a similar type name listed under minimum-widthinteger types and greatest-width integer types.

Each invocation of one of these macros expands to an integer constantexpression suitable for use in#if preprocessing directives. The type of theexpression has the same type as would an expression that is anobject of the corresponding type converted according to the integer promotions. The valueof the expression is that of the argument. The argument in anyinstance of these macros is a decimal, octal, or hexadecimal constant witha value that does not exceed the limits for the corresponding type.

Macros for minimum-width integer constant expressions

The macroINTN_C(value) expands to an integer constant expression corresponding to the typeint_leastN_t. The macroUINTN_C(value) expands to an integer constant expression corresponding to the typeuint_leastN_t. For example, ifuint_least64_t is a name for the type unsigned long long, thenUINT64_C(0x123) might expand to the integer constant0x123ULL.

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 typeintmax_t:

INTMAX_C(value)

The following macro expands to an integer constant expression having the value specified by its argument and the typeuintmax_t:

UINTMAX_C(value)

Attributes

Seeattributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
Standard

See Also

inttypes.h(3HEAD),signal.h(3HEAD),stddef.h(3HEAD),wchar.h(3HEAD),attributes(5),standards(5)

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices
PreviousNext

[8]ページ先頭

©2009-2025 Movatter.jp