       
SYNOPSIS
       #include <locale.h>

DESCRIPTION
       Some  of the functionality described on this reference page extends the
       ISO C standard. Any conflict between the  requirements  described  here
       and   the   ISO C   standard   is   unintentional.    This   volume  of
       IEEE Std 1003.1-2001 defers to the ISO C standard.

       The <'locale'.h> header shall provide a definition for  'lconv'  structure,
       which  shall  include  at least the following members. (See the defini-
       tions of LC_MONETARY in LC_MONETARY and LC_NUMERIC .)


              char    *'currency_symbol'
              char    *'decimal_point'
              char     'frac_digits'
              char    *'grouping'
              char    *'int_curr_symbol'
              char     'int_frac_digits'
              char     'int_n_cs_precedes'
              char     'int_n_sep_by_space'
              char     'int_n_sign_posn'
              char     'int_p_cs_precedes'
              char     'int_p_sep_by_space'
              char     'int_p_sign_posn'
              char    *'mon_decimal_point'
              char    *'mon_grouping'
              char    *'mon_thousands_sep'
              char    *'negative_sign'
              char     'n_cs_precedes'
              char     'n_sep_by_space'
              char     'n_sign_posn'
              char    *'positive_sign'
              char     'p_cs_precedes'
              char     'p_sep_by_space'
              char     'p_sign_posn'
              char    *'thousands_sep'

       The <locale.h> header shall define NULL (as defined in <stddef.h> ) and
       at least the following as macros:


       'LC_ALL'
       'LC_COLLATE'
       'LC_CTYPE'

       'LC_MESSAGES'

       'LC_MONETARY'
       'LC_NUMERIC'
       'LC_TIME'

       which shall expand to distinct integer constant expressions, for use as
       the first argument to the setlocale() function.

       Additional macro definitions, beginning with the characters LC_ and  an
       uppercase letter, may also be given here.

       
SYNOPSIS
       #include <math.h>

DESCRIPTION
       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, Sec-
       tion 2.2, The Compilation Environment)  to  enable  the  visibility  of
       these symbols in this header.

       The  <'math'.h> header shall include definitions for at least the follow-
       ing types:

       'float_t'
              A real-floating type at least as wide as float.

       'double_t'
              A real-floating type at least as wide as double, and at least as
              wide as float_t.


       If  'FLT_EVAL_METHOD'  equals  0, float_t and double_t shall be float and
       double, respectively; if FLT_EVAL_METHOD equals 1, they shall  both  be
       double;  if  FLT_EVAL_METHOD  equals 2, they shall both be long double;
       for other values of FLT_EVAL_METHOD, they are otherwise implementation-
       defined.

       The  <math.h>  header  shall  define  the following macros, where real-
       floating indicates that the argument shall be an  expression  of  real-
       floating type:


              int 'fpclassify'(real-floating x);
              int 'isfinite'(real-floating x);
              int 'isinf'(real-floating x);
              int 'isnan'(real-floating x);
              int 'isnormal'(real-floating x);
              int 'signbit'(real-floating x);
              int 'isgreater'(real-floating x, real-floating y);
              int 'isgreaterequal'(real-floating x, real-floating y);
              int 'isless'(real-floating x, real-floating y);
              int 'islessequal'(real-floating x, real-floating y);
              int 'islessgreater'(real-floating x, real-floating y);
              int 'isunordered'(real-floating x, real-floating y);

       The  <math.h>  header  shall  provide for the following constants.  The
       values are of type double and are accurate within the precision of  the
       double type.

       'M_E'    Value of e

       'M_LOG2E'
              Value of log_2e

       'M_LOG10E'
              Value of log_10e

       'M_LN2'  Value of log_e2

       'M_LN10' Value of log_e10

       'M_PI'   Value of pi

       'M_PI_2' Value of pi/2

       'M_PI_4' Value of pi/4

       'M_1_PI' Value of 1/pi

       'M_2_PI' Value of 2/pi

       'M_2_SQRTPI'
              Value of 2/ sqrt pi

       'M_SQRT2'
              Value of sqrt 2

       'M_SQRT1_2'
              Value of 1/sqrt 2


       The header shall define the following symbolic constants:

       'MAXFLOAT'
              Value  of  maximum  non-infinite single-precision floating-point
              number.

       'HUGE_VAL'
              A positive double expression, not necessarily representable as a
              float.  Used  as  an  error  value  returned  by the mathematics
              library. HUGE_VAL evaluates to +infinity on  systems  supporting
              IEEE Std 754-1985.

       'HUGE_VALF'
              A  positive  float  constant  expression. Used as an error value
              returned by the  mathematics  library.  HUGE_VALF  evaluates  to
              +infinity on systems supporting IEEE Std 754-1985.

       'HUGE_VALL'
              A  positive  long  double  constant expression. Used as an error
              value returned by the mathematics library.  HUGE_VALL  evaluates
              to +infinity on systems supporting IEEE Std 754-1985.

       'INFINITY'
              A  constant  expression  of  type float representing positive or
              unsigned infinity, if available; else  a  positive  constant  of
              type float that overflows at translation time.

       'NAN'    A  constant  expression  of type float representing a quiet NaN.
              This symbolic constant is only  defined  if  the  implementation
              supports quiet NaNs for the float type.


       The  following  macros shall be defined for number classification. They
       represent the mutually-exclusive kinds of floating-point  values.  They
       expand to integer constant expressions with distinct values. Additional
       implementation-defined floating-point classifications, with macro defi-
       nitions  beginning with FP_ and an uppercase letter, may also be speci-
       fied by the implementation.


              'FP_INFINITE'
              'FP_NAN'
              'FP_NORMAL'
              'FP_SUBNORMAL'
              'FP_ZERO'

       The following optional macros indicate  whether  the  fma()  family  of
       functions are fast compared with direct code:


              'FP_FAST_FMA'
              'FP_FAST_FMAF'
              'FP_FAST_FMAL'

       The FP_FAST_FMA macro shall be defined to indicate that the fma() func-
       tion generally executes about as fast as, or faster  than,  a  multiply
       and  an  add  of  double operands. The other macros have the equivalent
       meaning for the float and long double versions.

       The following macros shall expand to integer constant expressions whose
       values are returned by ilogb( x) if x is zero or NaN, respectively. The
       value of FP_ILOGB0 shall be either {INT_MIN} or - {INT_MAX}. The  value
       of FP_ILOGBNAN shall be either {INT_MAX} or {INT_MIN}.


              'FP_ILOGB0'
              'FP_ILOGBNAN'

       The  following  macros  shall  expand to the integer constants 1 and 2,
       respectively;


              'MATH_ERRNO'
              'MATH_ERREXCEPT'

       The following macro shall expand to an expression that has type int and
       the  value  MATH_ERRNO,  MATH_ERREXCEPT, or the bitwise-inclusive OR of
       both:


              'math_errhandling'

       The value of math_errhandling is constant for the duration of the  pro-
       gram. It is unspecified whether math_errhandling is a macro or an iden-
       tifier with external linkage. If a macro definition is suppressed or  a
       program  defines  an  identifier  with  the name math_errhandling , the
       behavior  is  undefined.  If   the   expression   (math_errhandling   &
       MATH_ERREXCEPT)  can  be  non-zero, the implementation shall define the
       macros FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW in <fenv.h>.

       
SYNOPSIS
       #include <sys/mman.h>

DESCRIPTION
       The  <sys/'mman'.h>  header shall be supported if the implementation sup-
       ports at least one of the following options:

        * The Memory Mapped Files option


        * The Shared Memory Objects option


        * The Process Memory Locking option


        * The Memory Protection option


        * The Typed Memory Objects option


        * The Synchronized Input and Output option


        * The Advisory Information option


        * The Typed Memory Objects option


       If one or more of the Advisory Information,  Memory  Mapped  Files,  or
       Shared  Memory  Objects options are supported, the following protection
       options shall be defined:

       'PROT_READ'
              Page can be read.

       'PROT_WRITE'
              Page can be written.

       'PROT_EXEC'
              Page can be executed.

       'PROT_NONE'
              Page cannot be accessed.


       The following flag options shall be defined:

       'MAP_SHARED'
              Share changes.

       'MAP_PRIVATE'
              Changes are private.

       'MAP_FIXED'
              Interpret addr exactly.


       The following flags shall be defined for 'msync'():

       'MS_ASYNC'
              Perform asynchronous writes.

       'MS_SYNC'
              Perform synchronous writes.

       'MS_INVALIDATE'
              Invalidate mappings.


       The following symbolic constants shall be defined  for  the  'mlockall'()
       function:

       'MCL_CURRENT'
              Lock currently mapped pages.

       'MCL_FUTURE'
              Lock pages that become mapped.


       The symbolic constant 'MAP_FAILED' shall be defined to indicate a failure
       from the mmap() function.

       If the Advisory Information and  either  the  Memory  Mapped  Files  or
       Shared  Memory Objects options are supported, values for advice used by
       'posix_madvise'() shall be defined as follows:

       'POSIX_MADV_NORMAL'

              The application has no advice  to  give  on  its  behavior  with
              respect to the specified range. It is the default characteristic
              if no advice is given for a range of memory.

       'POSIX_MADV_SEQUENTIAL'

              The application expects to access the  specified  range  sequen-
              tially from lower addresses to higher addresses.

       'POSIX_MADV_RANDOM'

              The  application expects to access the specified range in a ran-
              dom order.

       'POSIX_MADV_WILLNEED'

              The application expects to access the  specified  range  in  the
              near future.

       'POSIX_MADV_DONTNEED'

              The  application  expects  that it will not access the specified
              range in the near future.


       The following flags shall be defined for 'posix_typed_mem_open'():

       'POSIX_TYPED_MEM_ALLOCATE'

              Allocate on mmap().

       'POSIX_TYPED_MEM_ALLOCATE_CONTIG'

              Allocate contiguously on mmap().

       'POSIX_TYPED_MEM_MAP_ALLOCATABLE'

              Map on mmap(), without affecting allocatability.


       The mode_t, off_t, and size_t types shall be defined  as  described  in
       <sys/types.h> .

       The     <sys/mman.h>     header     shall    define    the    structure
       'posix_typed_mem_info', which includes at least the following member:


              size_t  'posix_tmi_length'  Maximum length which may be allocated
                                        from a typed memory object.

       
SYNOPSIS
       #include <monetary.h>

DESCRIPTION
       The <'monetary'.h> header shall define the following types:

       size_t As described in <stddef.h> .

       ssize_t
              As described in <sys/types.h> .


       The  following  shall be declared as a function and may also be defined
       as a macro. A function prototype shall be provided.


              ssize_t  'strfmon'(char *restrict, size_t, const char *restrict, ...);

       
SYNOPSIS
       #include <mqueue.h>

DESCRIPTION
       The  <'mqueue'.h>  header  shall define the 'mqd_t' type, which is used for
       message queue descriptors. This is not an array type.

       The <mqueue.h> header shall define the sigevent structure (as described
       in <signal.h> ) and the mq_attr structure, which is used in getting and
       setting the attributes of a message queue. Attributes are initially set
       when  the  message queue is created. An 'mq_attr' structure shall have at
       least the following fields:


              long    'mq_flags'    Message queue flags.
              long    'mq_maxmsg'   Maximum number of messages.
              long    'mq_msgsize'  Maximum message size.
              long    'mq_curmsgs'  Number of messages currently queued.

       
SYNOPSIS
       #include <sys/msg.h>

DESCRIPTION
       The  <sys/'msg'.h>  header  shall define the following data types through
       typedef:

       'msgqnum_t'
              Used for the number of messages in the message queue.

       'msglen_t'
              Used for the number of bytes allowed in a message queue.


       These types shall be unsigned integer types that are able to store val-
       ues at least as large as a type unsigned short.

       The <sys/msg.h> header shall define the following constant as a message
       operation flag:

       'MSG_NOERROR'
              No error if big message.


       The 'msqid_ds' structure shall contain the following members:


              struct ipc_perm 'msg_perm'   Operation permission structure.
              msgqnum_t       'msg_qnum'   Number of messages currently on queue.
              msglen_t        'msg_qbytes' Maximum number of bytes allowed on queue.
              pid_t           'msg_lspid'  Process ID of last msgsnd
               ().
              pid_t           'msg_lrpid'  Process ID of last msgrcv
               ().
              time_t          'msg_stime'  Time of last msgsnd
               ().
              time_t          'msg_rtime'  Time of last msgrcv
               ().
              time_t          'msg_ctime'  Time of last change.

       The pid_t, time_t, key_t, size_t, and ssize_t types shall be defined as
       described in <sys/types.h> .

       
SYNOPSIS
       #include <ndbm.h>

DESCRIPTION
       The  <'ndbm'.h>  header  shall  define the 'datum' type as a structure that
       includes at least the following members:


              void   *'dptr'  A pointer to the application's data.
              size_t  'dsize' The size of the object pointed to by dptr.

       The size_t type shall be defined as described in <stddef.h> .

       The <ndbm.h> header shall define the 'DBM' type.

       The following constants shall be defined as  possible  values  for  the
       store_mode argument to 'dbm_store'():

       'DBM_INSERT'
              Insertion of new entries only.

       'DBM_REPLACE'
              Allow replacing existing entries.


       
SYNOPSIS
       #include <netdb.h>

DESCRIPTION
       The  <'netdb'.h>  header  may define the in_port_t type and the in_addr_t
       type as described in <netinet/in.h> .

       The <netdb.h> header shall define the 'hostent' structure  that  includes
       at least the following members:


              char   *'h_name'       Official name of the host.
              char  **'h_aliases'    A pointer to an array of pointers to
                                   alternative host names, terminated by a
                                   null pointer.
              int     'h_addrtype'   Address type.
              int     'h_length'     The length, in bytes, of the address.
              char  **'h_addr_list'  A pointer to an array of pointers to network
                                   addresses (in network byte order) for the host,
                                   terminated by a null pointer.

       The <netdb.h> header shall define the 'netent' structure that includes at
       least the following members:


              char     *'n_name'      Official, fully-qualified (including the
                                    domain) name of the host.
              char    **'n_aliases'   A pointer to an array of pointers to
                                    alternative network names, terminated by a
                                    null pointer.
              int       'n_addrtype'  The address type of the network.
              uint32_t  'n_net'       The network number, in host byte order.

       The uint32_t type shall be defined as described in <inttypes.h> .

       The <netdb.h> header shall define the 'protoent' structure that  includes
       at least the following members:


              char   *'p_name'     Official name of the protocol.
              char  **'p_aliases'  A pointer to an array of pointers to
                                 alternative protocol names, terminated by
                                 a null pointer.
              int     'p_proto'    The protocol number.

       The  <netdb.h>  header shall define the 'servent' structure that includes
       at least the following members:


              char   *'s_name'     Official name of the service.
              char  **'s_aliases'  A pointer to an array of pointers to
                                 alternative service names, terminated by
                                 a null pointer.
              int     's_port'     The port number at which the service
                                 resides, in network byte order.
              char   *'s_proto'    The name of the protocol to use when
                                 contacting the service.

       The <netdb.h> header shall define the 'IPPORT_RESERVED'  macro  with  the
       value of the highest reserved Internet port number.

       When  the <netdb.h> header is included, 'h_errno' shall be available as a
       modifiable lvalue of type int. It is unspecified whether h_errno  is  a
       macro or an identifier declared with external linkage.

       The <netdb.h> header shall define the following macros for use as error
       values for gethostbyaddr() and gethostbyname():


              'HOST_NOT_FOUND'
              'NO_DATA'
              'NO_RECOVERY'
              'TRY_AGAIN'

   Address Information Structure
       The <netdb.h> header shall define the 'addrinfo' structure that  includes
       at least the following members:


              int               'ai_flags'      Input flags.
              int               'ai_family'     Address family of socket.
              int               'ai_socktype'   Socket type.
              int               'ai_protocol'   Protocol of socket.
              socklen_t         'ai_addrlen'    Length of socket address.
              struct sockaddr  *'ai_addr'       Socket address of socket.
              char             *'ai_canonname'  Canonical name of service location.
              struct addrinfo  *'ai_next'       Pointer to next in list.

       The <netdb.h> header shall define the following macros that evaluate to
       bitwise-distinct integer constants for use in the flags  field  of  the
       addrinfo structure:

       'AI_PASSIVE'
              Socket address is intended for bind().

       'AI_CANONNAME'

              Request for canonical name.

       'AI_NUMERICHOST'

              Return numeric host address as name.

       'AI_NUMERICSERV'

              Inhibit service name resolution.

       'AI_V4MAPPED'
              If  no  IPv6  addresses  are found, query for IPv4 addresses and
              return them to the caller as IPv4-mapped IPv6 addresses.

       'AI_ALL' Query for both IPv4 and IPv6 addresses.

       'AI_ADDRCONFIG'

              Query for IPv4 addresses only when an IPv4  address  is  config-
              ured; query for IPv6 addresses only when an IPv6 address is con-
              figured.


       The <netdb.h> header shall define the following macros that evaluate to
       bitwise-distinct  integer  constants  for  use in the flags argument to
       'getnameinfo'():

       'NI_NOFQDN'
              Only the nodename portion of the  FQDN  is  returned  for  local
              hosts.

       'NI_NUMERICHOST'

              The  numeric  form  of the node's address is returned instead of
              its name.

       'NI_NAMEREQD'
              Return an error if the node's name  cannot  be  located  in  the
              database.

       'NI_NUMERICSERV'

              The  numeric  form of the service address is returned instead of
              its name.

       'NI_NUMERICSCOPE'

              For IPv6 addresses, the numeric form of the scope identifier  is
              returned instead of its name.

       'NI_DGRAM'
              Indicates that the service is a datagram service (SOCK_DGRAM).


   Address Information Errors
       The <netdb.h> header shall define the following macros for use as error
       values for getaddrinfo() and getnameinfo():

       'EAI_AGAIN'
              The name could not be resolved at this time. Future attempts may
              succeed.

       'EAI_BADFLAGS'
              The flags had an invalid value.

       'EAI_FAIL'
              A non-recoverable error occurred.

       'EAI_FAMILY'
              The  address family was not recognized or the address length was
              invalid for the specified family.

       'EAI_MEMORY'
              There was a memory allocation failure.

       'EAI_NONAME'
              The name does not resolve for the supplied parameters.

       'NI_NAMEREQD' is set and the host's name cannot be located, or both node-
       name and servname were null.

       'EAI_SERVICE'
              The  service  passed was not recognized for the specified socket
              type.

       'EAI_SOCKTYPE'
              The intended socket type was not recognized.

       'EAI_SYSTEM'
              A system error occurred. The error code can be found in errno.

       'EAI_OVERFLOW'

              An argument buffer overflowed.


       
SYNOPSIS
       #include <nl_types.h>

DESCRIPTION
       The  <'nl_types'.h> header shall contain definitions of at least the fol-
       lowing types:

       'nl_catd'
              Used by the message catalog functions catopen(), catgets(),  and
              catclose() to identify a catalog descriptor.

       'nl_item'
              Used  by nl_langinfo() to identify items of langinfo data.  Val-
              ues of objects of type nl_item are defined in <langinfo.h> .


       The <nl_types.h> header shall contain definitions of at least the  fol-
       lowing constants:

       'NL_SETD'
              Used  by gencat when no $set directive is specified in a message
              text source file; see the Internationalization Guide. This  con-
              stant  can  be passed as the value of set_id on subsequent calls
              to catgets() (that is, to retrieve  messages  from  the  default
              message set). The value of NL_SETD is implementation-defined.

       'NL_CAT_LOCALE'
              Value  that must be passed as the oflag argument to catopen() to
              ensure that message catalog selection depends on the LC_MESSAGES
              locale  category,  rather  than directly on the LANG environment
              variable.


       
SYNOPSIS
       #include <poll.h>

DESCRIPTION
       The  <'poll'.h> header shall define the 'pollfd' structure that includes at
       least the following members:


              int    'fd'       The following descriptor being polled.
              short  'events'   The input event flags (see below).
              short  'revents'  The output event flags (see below).

       The <poll.h> header shall define the following type through typedef:

       'nfds_t' An unsigned integer type used for the number  of  file  descrip-
              tors.


       The  implementation  shall support one or more programming environments
       in which the width of nfds_t is no greater than the width of type long.
       The  names  of these programming environments can be obtained using the
       confstr() function or the getconf utility.

       The following symbolic constants shall be  defined,  zero  or  more  of
       which  may  be  OR'ed together to form the events or revents members in
       the pollfd structure:

       'POLLIN' Data other than high-priority data may be read without blocking.

       'POLLRDNORM'
              Normal data may be read without blocking.

       'POLLRDBAND'
              Priority data may be read without blocking.

       'POLLPRI'
              High priority data may be read without blocking.

       'POLLOUT'
              Normal data may be written without blocking.

       'POLLWRNORM'
              Equivalent to POLLOUT.

       'POLLWRBAND'
              Priority data may be written.

       'POLLERR'
              An error has occurred ( revents only).

       'POLLHUP'
              Device has been disconnected ( revents only).

       'POLLNVAL'
              Invalid fd member ( revents only).


       The  significance  and semantics of normal, priority, and high-priority
       data are file and device-specific.

       The following shall be declared as a function and may also  be  defined
       as a macro. A function prototype shall be provided.


              int   'poll'(struct pollfd[], nfds_t, int);

