
       
SYNOPSIS
       #include <stdio.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  <'stdio'.h>  header  shall  define  the following macros as positive
       integer constant expressions:

       'BUFSIZ' Size of <stdio.h> buffers.

       '_IOFBF' Input/output fully buffered.

       '_IOLBF' Input/output line buffered.

       '_IONBF' Input/output unbuffered.

       'L_ctermid'
              Maximum size of character array to hold ctermid() output.

       'L_tmpnam'
              Maximum size of character array to hold tmpnam() output.

       'SEEK_CUR'
              Seek relative to current position.

       'SEEK_END'
              Seek relative to end-of-file.

       'SEEK_SET'
              Seek relative to start-of-file.


       The following macros shall be  defined  as  positive  integer  constant
       expressions which denote implementation limits:

       {'FILENAME_MAX'}
              Maximum  size  in  bytes of the longest filename string that the
              implementation guarantees can be opened.

       {'FOPEN_MAX'}
              Number of streams which the  implementation  guarantees  can  be
              open simultaneously. The value is at least eight.

       {'TMP_MAX'}
              Minimum  number of unique filenames generated by tmpnam(). Maxi-
              mum number of times an application can call  tmpnam()  reliably.
              The  value of {TMP_MAX} is at least 25.   On XSI-conformant sys-
              tems, the value of {TMP_MAX} is at least 10000.


       The following macro name shall be defined as a  negative  integer  con-
       stant expression:

       'EOF'    End-of-file return value.


       The following macro name shall be defined as a null pointer constant:

       'NULL'   Null pointer.


       The following macro name shall be defined as a string constant:

       'P_tmpdir'
              Default directory prefix for tempnam().


       The following shall be defined as expressions of type "pointer to FILE"
       that point to the FILE objects associated, respectively, with the stan-
       dard error, input, and output streams:

       'stderr' Standard error output stream.

       'stdin'  Standard input stream.

       'stdout' Standard output stream.


       The following data types shall be defined through typedef:

       'FILE'   A structure containing information about a file.

       'fpos_t' A  non-array  type  containing all information needed to specify
              uniquely every position within a file.

       va_list
              As described in <stdarg.h> .

       size_t As described in <stddef.h> .


       
SYNOPSIS
       #include <stdlib.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 <'stdlib'.h> header shall define the following macros:

       'EXIT_FAILURE'
              Unsuccessful  termination  for  exit();  evaluates to a non-zero
              value.

       'EXIT_SUCCESS'
              Successful termination for exit(); evaluates to 0.

       NULL   Null pointer.

       {'RAND_MAX'}
              Maximum value returned by rand(); at least 32767.

       {'MB_CUR_MAX'}
              Integer expression whose value is the maximum number of bytes in
              a character specified by the current locale.


       The following data types shall be defined through typedef:

       'div_t'  Structure type returned by the div() function.

       'ldiv_t' Structure type returned by the ldiv() function.

       'lldiv_t'
              Structure type returned by the lldiv() function.

       size_t As described in <stddef.h> .

       wchar_t
              As described in <stddef.h> .


       In  addition,  the following symbolic names and macros shall be defined
       as in <sys/wait.h> , for use in decoding the  return  value  from  sys-
       tem():



       'WNOHANG'
       'WUNTRACED'
       'WEXITSTATUS'
       'WIFEXITED'
       'WIFSIGNALED'
       'WIFSTOPPED'
       'WSTOPSIG'
       'WTERMSIG'


       
SYNOPSIS
       #include <string.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 <'string'.h> header shall define the following:

       NULL   Null pointer constant.

       size_t As described in <stddef.h> .


       
SYNOPSIS
       #include <strings.h>

DESCRIPTION
       
SYNOPSIS
       #include <stropts.h>

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


              unsigned char  'bi_pri'   Priority band.
              int            'bi_flag'  Flushing type.

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


              struct strbuf  'ctlbuf'   The control portion of the message.
              struct strbuf  'databuf'  The data portion of the message.
              t_uscalar_t   '' flags    RS_HIPRI or 0.

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


              int    'maxlen'  Maximum buffer length.
              int    'len'     Length of data.
              char  *'buf'     Pointer to buffer.

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


              struct strbuf  'ctlbuf'   The control portion of the message.
              struct strbuf  'databuf'  The data portion of the message.
              t_uscalar_t    'flags'    RS_HIPRI or 0.
              int            'fildes'   File descriptor of the other STREAM.
              int            'offset'   Relative location of the stored value.

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


              int    'ic_cmd'     ioctl() command.
              int    'ic_timout'  Timeout for response.
              int    'ic_len'     Length of data.
              char  *'ic_dp'      Pointer to buffer.

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


              int    'fda'  Received file descriptor.
              uid_t  'uid'  UID of sender.
              gid_t  'gid'  GID of sender.

       The uid_t and gid_t types shall be defined through typedef as described
       in <sys/types.h> .

       The <stropts.h> header shall  define  the  't_scalar_t'  and  't_uscalar_t'
       types,  respectively,  as  signed  and  unsigned  opaque types of equal
       length of at least 32 bits.

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


              int                'sl_nmods'    Number of STREAMS module names.
              struct str_mlist  *'sl_modlist'  STREAMS module names.

       The  <stropts.h>  header  shall  define  the  'str_mlist'  structure that
       includes at least the following member:


              char  'l_name'[FMNAMESZ+1]  A STREAMS module name.

       At least the following macros shall be defined for use as  the  request
       argument to ioctl():

       'I_PUSH' Push a STREAMS module.

       'I_POP'  Pop a STREAMS module.

       'I_LOOK' Get the top module name.

       'I_FLUSH'
              Flush a STREAM.

       'I_FLUSHBAND'
              Flush one band of a STREAM.

       'I_SETSIG'
              Ask for notification signals.

       'I_GETSIG'
              Retrieve current notification signals.

       'I_FIND' Look for a STREAMS module.

       'I_PEEK' Peek at the top message on a STREAM.

       'I_SRDOPT'
              Set the read mode.

       'I_GRDOPT'
              Get the read mode.

       'I_NREAD'
              Size the top message.

       'I_FDINSERT'
              Send implementation-defined information about another STREAM.

       'I_STR'  Send a STREAMS ioctl().

       'I_SWROPT'
              Set the write mode.

       'I_GWROPT'
              Get the write mode.

       'I_SENDFD'
              Pass a file descriptor through a STREAMS pipe.

       'I_RECVFD'
              Get a file descriptor sent via I_SENDFD.

       'I_LIST' Get all the module names on a STREAM.

       'I_ATMARK'
              Is the top message "marked''?

       'I_CKBAND'
              See if any messages exist in a band.

       'I_GETBAND'
              Get the band of the top message on a STREAM.

       'I_CANPUT'
              Is a band writable?

       'I_SETCLTIME'
              Set close time delay.

       'I_GETCLTIME'
              Get close time delay.

       'I_LINK' Connect two STREAMs.

       'I_UNLINK'
              Disconnect two STREAMs.

       'I_PLINK'
              Persistently connect two STREAMs.

       'I_PUNLINK'
              Dismantle a persistent STREAMS link.


       At least the following macros shall be defined for use with I_LOOK:

       'FMNAMESZ'
              The  minimum  size in bytes of the buffer referred to by the arg
              argument.


       At least the following macros shall be defined for use with I_FLUSH:

       'FLUSHR' Flush read queues.

       'FLUSHW' Flush write queues.

       'FLUSHRW'
              Flush read and write queues.


       At least the following macros shall be defined for use with I_SETSIG:

       'S_RDNORM'
              A normal (priority band set to 0) message  has  arrived  at  the
              head of a STREAM head read queue.

       'S_RDBAND'
              A  message with a non-zero priority band has arrived at the head
              of a STREAM head read queue.

       'S_INPUT'
              A message, other than a high-priority message,  has  arrived  at
              the head of a STREAM head read queue.

       'S_HIPRI'
              A  high-priority message is present on a STREAM head read queue.

       'S_OUTPUT'
              The write queue for normal data (priority band 0) just below the
              STREAM  head  is  no longer full. This notifies the process that
              there is room on the queue for sending (or writing) normal  data
              downstream.

       'S_WRNORM'
              Equivalent to S_OUTPUT.

       'S_WRBAND'
              The  write  queue  for  a  non-zero priority band just below the
              STREAM head is no longer full.

       'S_MSG'  A STREAMS  signal  message  that  contains  the  SIGPOLL  signal
              reaches the front of the STREAM head read queue.

       'S_ERROR'
              Notification of an error condition reaches the STREAM head.

       'S_HANGUP'
              Notification of a hangup reaches the STREAM head.

       'S_BANDURG'
              When  used  in  conjunction  with  S_RDBAND, SIGURG is generated
              instead of SIGPOLL when a priority message reaches the front  of
              the STREAM head read queue.


       At least the following macros shall be defined for use with I_PEEK:

       'RS_HIPRI'
              Only look for high-priority messages.


       At least the following macros shall be defined for use with I_SRDOPT:

       'RNORM'  Byte-STREAM mode, the default.

       'RMSGD'  Message-discard mode.

       'RMSGN'  Message-non-discard mode.

       'RPROTNORM'
              Fail  read()  with  [EBADMSG]  if a message containing a control
              part is at the front of the STREAM head read queue.

       'RPROTDAT'
              Deliver the control part of a message as  data  when  a  process
              issues a read().

       'RPROTDIS'
              Discard the control part of a message, delivering any data part,
              when a process issues a read().


       At least the following macros shall be defined for use with I_SWOPT:

       'SNDZERO'
              Send a zero-length message downstream when a write() of 0  bytes
              occurs.


       At least the following macros shall be defined for use with I_ATMARK:

       'ANYMARK'
              Check if the message is marked.

       'LASTMARK'
              Check if the message is the last one marked on the queue.


       At least the following macros shall be defined for use with I_UNLINK:

       'MUXID_ALL'
              Unlink  all STREAMs linked to the STREAM associated with fildes.


       The  following  macros  shall  be  defined  for  getmsg(),   getpmsg(),
       putmsg(), and putpmsg():

       'MSG_ANY'
              Receive any message.

       'MSG_BAND'
              Receive message from specified band.

       'MSG_HIPRI'
              Send/receive high-priority message.

       'MORECTL'
              More control information is left in message.

       'MOREDATA'
              More data is left in message.


       The  <stropts.h>  header  may  make  visible  all  of  the symbols from
       <unistd.h>.

       
SYNOPSIS
       #include <sys/ipc.h>

DESCRIPTION
       The <sys/'ipc'.h> header is used by three mechanisms for XSI interprocess
       communication (IPC): messages, semaphores, and shared memory. All use a
       common  structure type, ipc_perm, to pass information used in determin-
       ing permission to perform an IPC operation.

       The 'ipc_perm' structure shall contain the following members:


              uid_t    'uid'    Owner's user ID.
              gid_t    'gid'    Owner's group ID.
              uid_t    'cuid'   Creator's user ID.
              gid_t    'cgid'   Creator's group ID.
              mode_t   'mode'   Read/write permission.

       The uid_t, gid_t, mode_t, and key_t types shall be defined as described
       in <sys/types.h> .

       Definitions shall be provided for the following constants:

       Mode bits:

       'IPC_CREAT'
              Create entry if key does not exist.

       'IPC_EXCL'
              Fail if key exists.

       'IPC_NOWAIT'
              Error if request must wait.


       Keys:

       'IPC_PRIVATE'
              Private key.


       Control commands:

       'IPC_RMID'
              Remove identifier.

       'IPC_SET'
              Set options.

       'IPC_STAT'
              Get options.


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


              key_t  'ftok'(const char *, int);




       
SYNOPSIS
       #include <sys/time.h>

DESCRIPTION
       The  <sys/'time'.h>  header  shall  define  the  'timeval'  structure  that
       includes at least the following members:


              time_t         'tv_sec'      Seconds.
              suseconds_t    'tv_usec'     Microseconds.

       The <sys/time.h> header  shall  define  the  'itimerval'  structure  that
       includes at least the following members:


              struct timeval 'it_interval' Timer interval.
              struct timeval 'it_value'    Current value.

       The  time_t  and  suseconds_t  types  shall  be defined as described in
       <sys/types.h> .

       The fd_set type shall be defined as described in <sys/select.h> .

       The <sys/time.h> header shall define the following values for the which
       argument of 'getitimer'() and 'setitimer'():

       'ITIMER_REAL'
              Decrements in real time.

       'ITIMER_VIRTUAL'
              Decrements in process virtual time.

       'ITIMER_PROF'
              Decrements  both  in process virtual time and when the system is
              running on behalf of the process.


       The following  shall  be  defined  as  described  in  <sys/select.h>  :
       FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE

       
SYNOPSIS
       #include <sys/timeb.h>

DESCRIPTION
       The <sys/'timeb'.h> header shall define the 'timeb' structure that includes
       at least the following members:


              time_t         'time'     The seconds portion of the current time.
              unsigned short 'millitm'  The milliseconds portion of the current time.
              short          'timezone' The local timezone in minutes west of Greenwich.
              short          'dstflag'  TRUE if Daylight Savings Time is in effect.

       The time_t type shall be defined 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.


              int   'ftime'(struct timeb *); (LEGACY )

       
SYNOPSIS
       #include <sys/times.h>

DESCRIPTION
       The  <sys/'times'.h>  header  shall  define  the  structure 'tms', which is
       returned by 'times'() and includes at least the following members:


              clock_t  'tms_utime'  User CPU time.
              clock_t  'tms_stime'  System CPU time.
              clock_t  'tms_cutime' User CPU time of terminated child processes.
              clock_t  'tms_cstime' System CPU time of terminated child processes.

       The clock_t type shall be defined 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.


              clock_t times(struct tms *);

       
SYNOPSIS
       #include <sys/types.h>

DESCRIPTION
       The  <sys/'types'.h>  header  shall  include definitions for at least the
       following types:

       'blkcnt_t'
              Used for file block counts.

       'blksize_t'
              Used for block sizes.

       'clock_t'
              Used for system times in  clock  ticks  or  CLOCKS_PER_SEC;  see
              <time.h> .

       'clockid_t'
              Used for clock ID type in the clock and timer functions.

       'dev_t'  Used for device IDs.

       'fsblkcnt_t'
              Used for file system block counts.

       'fsfilcnt_t'
              Used for file system file counts.

       'gid_t'  Used for group IDs.

       'id_t'   Used  as a general identifier; can be used to contain at least a
              pid_t, uid_t, or gid_t.

       'ino_t'  Used for file serial numbers.

       'key_t'  Used for XSI interprocess communication.

       'mode_t' Used for some file attributes.

       'nlink_t'
              Used for link counts.

       'off_t'  Used for file sizes.

       'pid_t'  Used for process IDs and process group IDs.

       'pthread_attr_t'
              Used to identify a thread attribute object.

       'pthread_barrier_t'
              Used to identify a barrier.

       'pthread_barrierattr_t'
              Used to define a barrier attributes object.

       'pthread_cond_t'
              Used for condition variables.

       'pthread_condattr_t'
              Used to identify a condition attribute object.

       'pthread_key_t'
              Used for thread-specific data keys.

       'pthread_mutex_t'
              Used for mutexes.

       'pthread_mutexattr_t'
              Used to identify a mutex attribute object.

       'pthread_once_t'
              Used for dynamic package initialization.

       'pthread_rwlock_t'
              Used for read-write locks.

       'pthread_rwlockattr_t'
              Used for read-write lock attributes.

       'pthread_spinlock_t'
              Used to identify a spin lock.

       'pthread_t'
              Used to identify a thread.

       'size_t' Used for sizes of objects.

       'ssize_t'
              Used for a count of bytes or an error indication.

       'suseconds_t'
              Used for time in microseconds.

       'time_t' Used for time in seconds.

       'timer_t'
              Used for timer ID returned by timer_create().

       'trace_attr_t'
              Used to identify a trace stream attributes object.

       'trace_event_id_t'
              Used to identify a trace event type.

       'trace_event_set_t'
              Used to identify a trace event type set.

       'trace_id_t'
              Used to identify a trace stream.

       'uid_t'  Used for user IDs.

       'useconds_t'
              Used for time in microseconds.


       All of the types shall be defined as arithmetic types of an appropriate
       length, with the following exceptions:



       key_t


       pthread_attr_t


       pthread_barrier_t
       pthread_barrierattr_t


       pthread_cond_t
       pthread_condattr_t
       pthread_key_t
       pthread_mutex_t
       pthread_mutexattr_t
       pthread_once_t
       pthread_rwlock_t
       pthread_rwlockattr_t


       pthread_spinlock_t


       trace_attr_t
       trace_event_id_t


       trace_event_set_t


       trace_id_t


       Additionally:

        * mode_t shall be an integer type.


        * nlink_t, uid_t, gid_t, and id_t shall be integer types.


        * blkcnt_t and off_t shall be signed integer types.


        * fsblkcnt_t,  fsfilcnt_t,    and  ino_t  shall be defined as unsigned
          integer types.


        * size_t shall be an unsigned integer type.


        * blksize_t, pid_t, and ssize_t shall be signed integer types.


        * time_t and clock_t shall be integer or real-floating types.


       The type ssize_t shall be capable of storing values  at  least  in  the
       range  [-1, {SSIZE_MAX}].     The  type useconds_t shall be an unsigned
       integer  type  capable  of  storing  values  at  least  in  the   range
       [0, 1000000]. The type suseconds_t shall be a signed integer type capa-
       ble of storing values at least in the range [-1, 1000000].

       The implementation shall support one or more  programming  environments
       in  which the widths of blksize_t, pid_t, size_t, ssize_t, suseconds_t,
       and useconds_t are 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.

       There are no defined comparison or assignment operators for the follow-
       ing types:



       pthread_attr_t


       pthread_barrier_t
       pthread_barrierattr_t


       pthread_cond_t
       pthread_condattr_t
       pthread_mutex_t
       pthread_mutexattr_t
       pthread_rwlock_t
       pthread_rwlockattr_t


       pthread_spinlock_t


       trace_attr_t

