<!DOCTYPE html PUBLIC "‐//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">     <html
xmlns="http://www.w3.org/1999/xhtml"> <head>
    <link            rel="stylesheet"             type="text/css"
href="../../../style.css" title="style" />
    <link  rel="stylesheet"  type="text/css"  href="../style.css"
title="style" />
    <meta             http‐equiv="content‐type"              con‐
tent="text/html;charset=utf‐8" />

    <title>unistd.h.0p ‐ Linux manual page</title> </head>

<body>

<div        class="page‐top"><a       id="top_of_page"></a></div>
<!‐‐%%%TOP_BAR%%%‐‐> <!‐‐%%%PAGE_START%%%‐‐>

<table class="sec‐table"> <tr>
    <td>
        <p class="section‐dir"> <a href="#PROLOG">PROLOG</a> | <a
href="#NAME">NAME</a>  |  <a  href="#SYNOPSIS">SYNOPSIS</a>  | <a
href="#DESCRIPTION">DESCRIPTION</a> |  <a  href="#APPLICATION_US‐
AGE">APPLICATION&nbsp;USAGE</a>   |  <a  href="#RATIONALE">RATIO‐
NALE</a>   |   <a    href="#FUTURE_DIRECTIONS">FUTURE&nbsp;DIREC‐
TIONS</a>    |   <a   href="#SEE_ALSO">SEE&nbsp;ALSO</a>   |   <a
href="#COPYRIGHT">COPYRIGHT</a>
        </p>
    </td>
    <td class="search‐box">
        <div class="man‐search‐box">

            <form                method="get"                 ac‐
tion="http://www.google.com/search">
                <fieldset class="man‐search">
                    <input    type="text"    name="q"   size="10"
maxlength="255" value="" />
                    <input type="hidden"  name="sitesearch"  val‐
ue="man7.org/linux/man‐pages" />
                    <input  type="submit" name="sa" value="Search
online pages" />
                </fieldset>
            </form>

        </div>
    </td>
    <td> </td> </tr> </table>

<pre> <span class="headline">unistd.h(0P)              POSIX Pro‐
grammer’s  Manual              unistd.h(0P)</span>  </pre> <h2><a
id="PROLOG" href="#PROLOG"></a>PROLOG  &nbsp; &nbsp; &nbsp;  &nb‐
sp;        <a        href="#top_of_page"><span        class="top‐
link">top</span></a></h2><pre>
       This manual page is part of the POSIX Programmer’s Manual.
The Linux
       implementation of this interface may differ (consult the
       corresponding  Linux  manual page for details of Linux be‐
havior), or
       the interface may not be  implemented  on  Linux.   </pre>
<h2><a id="NAME" href="#NAME"></a>NAME  &nbsp; &nbsp; &nbsp; &nb‐
sp;        <a        href="#top_of_page"><span        class="top‐
link">top</span></a></h2><pre>
       unistd.h  —  standard  symbolic constants and types </pre>
<h2><a id="SYNOPSIS" href="#SYNOPSIS"></a>SYNOPSIS  &nbsp; &nbsp;
&nbsp;    &nbsp;    <a    href="#top_of_page"><span   class="top‐
link">top</span></a></h2><pre>
       #include &lt;unistd.h&gt; </pre>  <h2><a  id="DESCRIPTION"
href="#DESCRIPTION"></a>DESCRIPTION   &nbsp; &nbsp; &nbsp; &nbsp;
<a             href="#top_of_page"><span              class="top‐
link">top</span></a></h2><pre>
       The  <i>&lt;unistd.h&gt;</i>  header defines miscellaneous
symbolic constants and
       types, and declares miscellaneous  functions.  The  actual
values of the
       constants are unspecified except as shown. The contents of
this
       header are shown below.

   <b>Version Test Macros</b>
       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constants.
       The values shall be suitable for use in <b>#if </b>prepro‐
cessing directives.

       _POSIX_VERSION
             Integer value indicating version  of  this  standard
(C‐language
             binding) to which the implementation conforms. For
             implementations conforming to POSIX.1‐2008, the val‐
ue shall be
             200809L.

       _POSIX2_VERSION
             Integer value indicating version of  the  Shell  and
Utilities
             volume  of  POSIX.1 to which the implementation con‐
forms. For
             implementations conforming to POSIX.1‐2008, the val‐
ue shall be
             200809L. For profile implementations that define
             _POSIX_SUBPROFILE   (see   <i>Section   2.1.5.1</i>,
<i>Subprofiling</i>
             <i>Considerations</i>)  in  <i>&lt;unistd.h&gt;</i>,
POSIX2_VERSION may be left
             undefined  or  be defined with the value −1 to indi‐
cate that the
             Shell and Utilities volume of POSIX.1  is  not  sup‐
ported. In this
             case,  a call to <i>sysconf(_SC_2_VERSION)</i> shall
return either
             200809L or −1 indicating that the Shell  and  Utili‐
ties volume of
             POSIX.1  is  or  is  not, respectively, supported at
runtime.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constant
       only  if  the  implementation supports the XSI option; see
<i>Section</i>
       <i>2.1.4</i>, <i>XSI  Conformance</i>.   If  defined,  its
value shall be suitable for
       use in <b>#if </b>preprocessing directives.

       _XOPEN_VERSION
             Integer  value  indicating  version  of  the  X/Open
Portability
             Guide to which the implementation conforms. The val‐
ue shall be
             700.

   <b>Constants for Options and Option Groups</b>
       The   following   symbolic   constants,   if   defined  in
<i>&lt;unistd.h&gt;</i>, shall
       have a value of −1, 0, or greater, unless otherwise speci‐
fied below.
       For  profile implementations that define _POSIX_SUBPROFILE
(see
       <i>Section   2.1.5.1</i>,    <i>Subprofiling    Considera‐
tions</i>) in <i>&lt;unistd.h&gt;</i>,
       constants described below as always having a value greater
than zero
       need not be defined and, if defined, may have a  value  of
−1, 0, or
       greater.   The  values shall be suitable for use in <b>#if
</b>preprocessing
       directives.

       If a symbolic constant is not defined or is  defined  with
the value
       −1,  the option is not supported for compilation. If it is
defined
       with a value greater than zero, the option shall always be
supported
       when  the  application  is executed. If it is defined with
the value
       zero, the option shall be supported  for  compilation  and
might or
       might   not   be  supported  at  runtime.  See  <i>Section
2.1.6</i>, <i>Options</i> for
       further information about the conformance requirements  of
these three
       categories of support.

       _POSIX_ADVISORY_INFO
             The implementation supports the Advisory Information
option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_ASYNCHRONOUS_IO
             The implementation supports asynchronous  input  and
output.
             This  symbol  shall  always  be  set  to  the  value
200809L.

       _POSIX_BARRIERS
             The implementation supports barriers.   This  symbol
shall always
             be set to the value 200809L.

       _POSIX_CHOWN_RESTRICTED
             The use of <i>chown</i>() and <i>fchown</i>() is re‐
stricted to a process with
             appropriate privileges, and to changing the group ID
of a file
             only  to the effective group ID of the process or to
one of its
             supplementary group IDs. This symbol  shall  be  de‐
fined with a
             value other than −1.

       _POSIX_CLOCK_SELECTION
             The  implementation  supports clock selection.  This
symbol shall
             always be set to the value 200809L.

       _POSIX_CPUTIME
             The implementation  supports  the  Process  CPU‐Time
Clocks option.
             If      this      symbol      is      defined     in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be −1, 0, or 200809L. The value of this  symbol  re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_FSYNC
             The implementation supports the File Synchronization
option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_IPV6
             The implementation supports  the  IPv6  option.   If
this symbol is
             defined  in <i>&lt;unistd.h&gt;</i>, it shall be de‐
fined to be −1, 0, or
             200809L.  The  value  of  this  symbol  reported  by
<i>sysconf</i>() shall
             either be −1 or 200809L.

       _POSIX_JOB_CONTROL
             The implementation supports job control. This symbol
shall
             always be set to a value greater than zero.

       _POSIX_MAPPED_FILES
             The implementation  supports  memory  mapped  Files.
This symbol
             shall always be set to the value 200809L.

       _POSIX_MEMLOCK
             The implementation supports the Process Memory Lock‐
ing option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_MEMLOCK_RANGE
             The implementation supports the Range Memory Locking
option.
             If      this      symbol      is      defined     in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be −1, 0, or 200809L. The value of this  symbol  re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_MEMORY_PROTECTION
             The implementation supports memory protection.  This
symbol
             shall always be set to the value 200809L.

       _POSIX_MESSAGE_PASSING
             The implementation supports the Message Passing  op‐
tion.  If
             this  symbol  is defined in <i>&lt;unistd.h&gt;</i>,
it shall be defined to be
             −1, 0, or 200809L. The value of this symbol reported
by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_MONOTONIC_CLOCK
             The  implementation supports the Monotonic Clock op‐
tion.  If
             this symbol is defined  in  <i>&lt;unistd.h&gt;</i>,
it shall be defined to be
             −1, 0, or 200809L. The value of this symbol reported
by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_NO_TRUNC
             Pathname components longer than {NAME_MAX}  generate
an error.
             This symbol shall be defined with a value other than
−1.

       _POSIX_PRIORITIZED_IO
             The implementation supports  the  Prioritized  Input
and Output
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX_PRIORITY_SCHEDULING
             The implementation supports the  Process  Scheduling
option.  If
             this  symbol  is defined in <i>&lt;unistd.h&gt;</i>,
it shall be defined to be
             −1, 0, or 200809L. The value of this symbol reported
by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_RAW_SOCKETS
             The  implementation supports the Raw Sockets option.
If this
             symbol is  defined  in  <i>&lt;unistd.h&gt;</i>,  it
shall be defined to be −1,
             0,  or 200809L. The value of this symbol reported by
<i>sysconf</i>()
             shall either be −1 or 200809L.

       _POSIX_READER_WRITER_LOCKS
             The implementation supports read‐write locks.   This
symbol
             shall always be set to the value 200809L.

       _POSIX_REALTIME_SIGNALS
             The  implementation supports realtime signals.  This
symbol
             shall always be set to the value 200809L.

       _POSIX_REGEXP
             The implementation supports the  Regular  Expression
Handling
             option.   This symbol shall always be set to a value
greater
             than zero.

       _POSIX_SAVED_IDS
             Each process has a saved  set‐user‐ID  and  a  saved
set‐group‐ID.
             This  symbol  shall always be set to a value greater
than zero.

       _POSIX_SEMAPHORES
             The implementation supports semaphores.  This symbol
shall
             always be set to the value 200809L.

       _POSIX_SHARED_MEMORY_OBJECTS
             The  implementation  supports  the Shared Memory Ob‐
jects option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_SHELL
             The implementation supports the  POSIX  shell.  This
symbol shall
             always be set to a value greater than zero.

       _POSIX_SPAWN
             The  implementation  supports  the Spawn option.  If
this symbol
             is defined in <i>&lt;unistd.h&gt;</i>, it  shall  be
defined to be −1, 0, or
             200809L.  The  value  of  this  symbol  reported  by
<i>sysconf</i>() shall
             either be −1 or 200809L.

       _POSIX_SPIN_LOCKS
             The implementation supports spin locks.  This symbol
shall
             always be set to the value 200809L.

       _POSIX_SPORADIC_SERVER
             The  implementation  supports  the  Process Sporadic
Server option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_SYNCHRONIZED_IO
             The implementation supports the  Synchronized  Input
and Output
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX_THREAD_ATTR_STACKADDR
             The implementation supports the Thread Stack Address
Attribute
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX_THREAD_ATTR_STACKSIZE
             The implementation supports the  Thread  Stack  Size
Attribute
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX_THREAD_CPUTIME
             The  implementation  supports  the  Thread  CPU‐Time
Clocks option.
             If      this      symbol      is      defined     in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be −1, 0, or 200809L. The value of this  symbol  re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_THREAD_PRIO_INHERIT
             The  implementation  supports  the  Non‐Robust Mutex
Priority
             Inheritance option. If this  symbol  is  defined  in
<i>&lt;unistd.h&gt;</i>, it
             shall  be defined to be −1, 0, or 200809L. The value
of this
             symbol reported by <i>sysconf</i>() shall either  be
−1 or 200809L.

       _POSIX_THREAD_PRIO_PROTECT
             The  implementation  supports  the  Non‐Robust Mutex
Priority
             Protection option. If  this  symbol  is  defined  in
<i>&lt;unistd.h&gt;</i>, it
             shall  be defined to be −1, 0, or 200809L. The value
of this
             symbol reported by <i>sysconf</i>() shall either  be
−1 or 200809L.

       _POSIX_THREAD_PRIORITY_SCHEDULING
             The  implementation  supports  the  Thread Execution
Scheduling
             option.    If   this   symbol    is    defined    in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined  to  be −1, 0, or 200809L. The value of this
symbol
             reported by <i>sysconf</i>() shall either be  −1  or
200809L.

       _POSIX_THREAD_PROCESS_SHARED
             The  implementation  supports  the  Thread  Process‐
Shared
             Synchronization option.  If this symbol  is  defined
in
             <i>&lt;unistd.h&gt;</i>,  it  shall be defined to be
−1, 0, or 200809L. The
             value of this symbol  reported  by  <i>sysconf</i>()
shall either be −1
             or 200809L.

       _POSIX_THREAD_ROBUST_PRIO_INHERIT
             The implementation supports the Robust Mutex Priori‐
ty
             Inheritance option. If this  symbol  is  defined  in
<i>&lt;unistd.h&gt;</i>, it
             shall  be defined to be −1, 0, or 200809L. The value
of this
             symbol reported by <i>sysconf</i>() shall either  be
−1 or 200809L.

       _POSIX_THREAD_ROBUST_PRIO_PROTECT
             The implementation supports the Robust Mutex Priori‐
ty
             Protection option. If  this  symbol  is  defined  in
<i>&lt;unistd.h&gt;</i>, it
             shall  be defined to be −1, 0, or 200809L. The value
of this
             symbol reported by <i>sysconf</i>() shall either  be
−1 or 200809L.

       _POSIX_THREAD_SAFE_FUNCTIONS
             The  implementation  supports thread‐safe functions.
This symbol
             shall always be set to the value 200809L.

       _POSIX_THREAD_SPORADIC_SERVER
             The  implementation  supports  the  Thread  Sporadic
Server option.
             If      this      symbol      is      defined     in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be −1, 0, or 200809L. The value of this  symbol  re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_THREADS
             The  implementation  supports  threads.  This symbol
shall always
             be set to the value 200809L.

       _POSIX_TIMEOUTS
             The implementation supports timeouts.   This  symbol
shall always
             be set to the value 200809L.

       _POSIX_TIMERS
             The  implementation  supports  timers.   This symbol
shall always
             be set to the value 200809L.

       _POSIX_TRACE
             The implementation supports the  Trace  option.   If
this symbol
             is  defined  in <i>&lt;unistd.h&gt;</i>, it shall be
defined to be −1, 0, or
             200809L.  The  value  of  this  symbol  reported  by
<i>sysconf</i>() shall
             either be −1 or 200809L.

       _POSIX_TRACE_EVENT_FILTER
             The  implementation  supports the Trace Event Filter
option.  If
             this symbol is defined  in  <i>&lt;unistd.h&gt;</i>,
it shall be defined to be
             −1, 0, or 200809L. The value of this symbol reported
by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_TRACE_INHERIT
             The implementation supports the  Trace  Inherit  op‐
tion.  If this
             symbol  is  defined  in  <i>&lt;unistd.h&gt;</i>, it
shall be defined to be −1,
             0, or 200809L. The value of this symbol reported  by
<i>sysconf</i>()
             shall either be −1 or 200809L.

       _POSIX_TRACE_LOG
             The  implementation  supports  the Trace Log option.
If this
             symbol is  defined  in  <i>&lt;unistd.h&gt;</i>,  it
shall be defined to be −1,
             0,  or 200809L. The value of this symbol reported by
<i>sysconf</i>()
             shall either be −1 or 200809L.

       _POSIX_TYPED_MEMORY_OBJECTS
             The implementation supports the Typed Memory Objects
option.
             If      this      symbol      is      defined     in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be −1, 0, or 200809L. The value of this  symbol  re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX_V6_ILP32_OFF32
             The implementation provides a C‐language compilation
             environment  with  32‐bit  <b>int</b>,  <b>long</b>,
<b>pointer</b>, and <b>off_t </b>types.

       _POSIX_V6_ILP32_OFFBIG
             The implementation provides a C‐language compilation
             environment with 32‐bit <b>int</b>, <b>long</b>, and
<b>pointer </b>types and an
             <b>off_t </b>type using at least 64 bits.

       _POSIX_V6_LP64_OFF64
             The implementation provides a C‐language compilation
             environment   with   32‐bit  <b>int  </b>and  64‐bit
<b>long</b>, <b>pointer</b>, and <b>off_t</b>
             types.

       _POSIX_V6_LPBIG_OFFBIG
             The implementation provides a C‐language compilation
             environment with an <b>int </b>type using  at  least
32 bits and <b>long</b>,
             <b>pointer</b>,  and  <b>off_t  </b>types  using  at
least 64 bits.

       _POSIX_V7_ILP32_OFF32
             The implementation provides a C‐language compilation
             environment  with  32‐bit  <b>int</b>,  <b>long</b>,
<b>pointer</b>, and <b>off_t </b>types.

       _POSIX_V7_ILP32_OFFBIG
             The implementation provides a C‐language compilation
             environment with 32‐bit <b>int</b>, <b>long</b>, and
<b>pointer </b>types and an
             <b>off_t </b>type using at least 64 bits.

       _POSIX_V7_LP64_OFF64
             The implementation provides a C‐language compilation
             environment  with  32‐bit  <b>int   </b>and   64‐bit
<b>long</b>, <b>pointer</b>, and <b>off_t</b>
             types.

       _POSIX_V7_LPBIG_OFFBIG
             The implementation provides a C‐language compilation
             environment  with  an <b>int </b>type using at least
32 bits and <b>long</b>,
             <b>pointer</b>,  and  <b>off_t  </b>types  using  at
least 64 bits.

       _POSIX2_C_BIND
             The  implementation  supports the C‐Language Binding
option. This
             symbol shall always have the value 200809L.

       _POSIX2_C_DEV
             The implementation supports the C‐Language  Develop‐
ment
             Utilities  option.   If  this  symbol  is defined in
<i>&lt;unistd.h&gt;</i>, it
             shall be defined to be −1, 0, or 200809L. The  value
of this
             symbol  reported by <i>sysconf</i>() shall either be
−1 or 200809L.

       _POSIX2_CHAR_TERM
             The implementation supports the Terminal  Character‐
istics
             option.   The  value  of  this  symbol  reported  by
<i>sysconf</i>() shall
             either be −1 or a value greater than zero.

       _POSIX2_FORT_DEV
             The implementation supports the FORTRAN  Development
Utilities
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX2_FORT_RUN
             The  implementation  supports  the  FORTRAN  Runtime
Utilities
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX2_LOCALEDEF
             The implementation supports the creation of  locales
by the
             <i>localedef</i> utility.  If this symbol is defined
in <i>&lt;unistd.h&gt;</i>, it
             shall be defined to be −1, 0, or 200809L. The  value
of this
             symbol  reported by <i>sysconf</i>() shall either be
−1 or 200809L.

       _POSIX2_PBS
             The implementation supports  the  Batch  Environment
Services and
             Utilities  option.   If  this  symbol  is defined in
<i>&lt;unistd.h&gt;</i>, it
             shall be defined to be −1, 0, or 200809L. The  value
of this
             symbol  reported by <i>sysconf</i>() shall either be
−1 or 200809L.

       _POSIX2_PBS_ACCOUNTING
             The implementation supports the Batch Accounting op‐
tion.  If
             this  symbol  is defined in <i>&lt;unistd.h&gt;</i>,
it shall be defined to be
             −1, 0, or 200809L. The value of this symbol reported
by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX2_PBS_CHECKPOINT
             The   implementation   supports   the  Batch  Check‐
point/Restart
             option.    If   this   symbol    is    defined    in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined  to  be −1, 0, or 200809L. The value of this
symbol
             reported by <i>sysconf</i>() shall either be  −1  or
200809L.

       _POSIX2_PBS_LOCATE
             The implementation supports the Locate Batch Job Re‐
quest
             option.    If   this   symbol    is    defined    in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined  to  be −1, 0, or 200809L. The value of this
symbol
             reported by <i>sysconf</i>() shall either be  −1  or
200809L.

       _POSIX2_PBS_MESSAGE
             The  implementation  supports  the Batch Job Message
Request
             option.    If   this   symbol    is    defined    in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined  to  be −1, 0, or 200809L. The value of this
symbol
             reported by <i>sysconf</i>() shall either be  −1  or
200809L.

       _POSIX2_PBS_TRACK
             The  implementation supports the Track Batch Job Re‐
quest option.
             If     this      symbol      is      defined      in
<i>&lt;unistd.h&gt;</i>, it shall be defined to
             be  −1,  0, or 200809L. The value of this symbol re‐
ported by
             <i>sysconf</i>() shall either be −1 or 200809L.

       _POSIX2_SW_DEV
             The implementation supports the Software Development
Utilities
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _POSIX2_UPE
             The implementation  supports  the  User  Portability
Utilities
             option.     If    this    symbol   is   defined   in
<i>&lt;unistd.h&gt;</i>, it shall be
             defined to be −1, 0, or 200809L. The value  of  this
symbol
             reported  by  <i>sysconf</i>() shall either be −1 or
200809L.

       _XOPEN_CRYPT
             The implementation supports  the  X/Open  Encryption
Option Group.

       _XOPEN_ENH_I18N
             The  implementation  supports the Issue 4, Version 2
Enhanced
             Internationalization Option Group. This symbol shall
always be
             set to a value other than −1.

       _XOPEN_REALTIME
             The  implementation supports the X/Open Realtime Op‐
tion Group.

       _XOPEN_REALTIME_THREADS
             The  implementation  supports  the  X/Open  Realtime
Threads Option
             Group.

       _XOPEN_SHM
             The  implementation  supports the Issue 4, Version 2
Shared
             Memory Option Group. This symbol shall always be set
to a value
             other than −1.

       _XOPEN_STREAMS
             The  implementation  supports the XSI STREAMS Option
Group.

       _XOPEN_UNIX
             The implementation supports the XSI option.

       _XOPEN_UUCP
             The implementation supports the UUCP  Utilities  op‐
tion. If this
             symbol  is  defined  in  <i>&lt;unistd.h&gt;</i>, it
shall be defined to be −1,
             0, or 200809L. The value of this symbol reported  by
<i>sysconf</i>()
             shall be either −1 or 200809L.

   <b>Execution‐Time Symbolic Constants</b>
       If any of the following symbolic constants are not defined
in the
       <i>&lt;unistd.h&gt;</i> header, the value shall  vary  de‐
pending on the file to
       which  it  is  applied. If defined, they shall have values
suitable for
       use in <b>#if </b>preprocessing directives.

       If any of the following symbolic constants are defined  to
have value
       −1  in the <i>&lt;unistd.h&gt;</i> header, the implementa‐
tion shall not provide the
       option on any file; if any are defined  to  have  a  value
other than −1
       in  the <i>&lt;unistd.h&gt;</i> header, the implementation
shall provide the option
       on all applicable files.

       All of the following values, whether defined  as  symbolic
constants in
       <i>&lt;unistd.h&gt;</i>  or  not,  may be queried with re‐
spect to a specific file
       using the <i>pathconf</i>()  or  <i>fpathconf</i>()  func‐
tions:

       _POSIX_ASYNC_IO
             Asynchronous  input or output operations may be per‐
formed for
             the associated file.

       _POSIX_PRIO_IO
             Prioritized input or output operations may  be  per‐
formed for the
             associated file.

       _POSIX_SYNC_IO
             Synchronized  input or output operations may be per‐
formed for
             the associated file.

       If the following symbolic constants  are  defined  in  the
<i>&lt;unistd.h&gt;</i>
       header, they apply to files and all paths in all file sys‐
tems on the
       implementation:

       _POSIX_TIMESTAMP_RESOLUTION
             The resolution in nanoseconds  for  all  file  time‐
stamps.

       _POSIX2_SYMLINKS
             Symbolic links can be created.

   <b>Constants for Functions</b>
       The  <i>&lt;unistd.h&gt;</i>  header  shall define NULL as
described in <i>&lt;stddef.h&gt;</i>.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constants
       for  use  with  the  <i>access</i>()  function. The values
shall be suitable for
       use in <b>#if </b>preprocessing directives.

       F_OK        Test for existence of file.

       R_OK        Test for read permission.

       W_OK        Test for write permission.

       X_OK        Test for execute (search) permission.

       The constants F_OK, R_OK, W_OK, and X_OK and  the  expres‐
sions
       <i>R_OK</i>|<i>W_OK</i>,    <i>R_OK</i>|<i>X_OK</i>,   and
<i>R_OK</i>|<i>W_OK</i>|<i>X_OK</i> shall all have distinct
       values.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constants
       for the <i>confstr</i>() function:

       _CS_PATH
             This  is  the  value for the <i>PATH</i> environment
variable that finds
             all standard utilities.

       _CS_POSIX_V7_ILP32_OFF32_CFLAGS
             If  <i>sysconf</i>(_SC_V7_ILP32_OFF32)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             initial options to be given to the <i>c99</i> utili‐
ty to build an
             application  using  a  programming model with 32‐bit
<b>int</b>, <b>long</b>,
             <b>pointer</b>, and <b>off_t </b>types.

       _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
             If  <i>sysconf</i>(_SC_V7_ILP32_OFF32)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of final
             options to be given to  the  <i>c99</i>  utility  to
build an application
             using  a  programming  model with 32‐bit <b>int</b>,
<b>long</b>, <b>pointer</b>, and
             <b>off_t </b>types.

       _CS_POSIX_V7_ILP32_OFF32_LIBS
             If  <i>sysconf</i>(_SC_V7_ILP32_OFF32)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             libraries to be given to the <i>c99</i>  utility  to
build an
             application  using  a  programming model with 32‐bit
<b>int</b>, <b>long</b>,
             <b>pointer</b>, and <b>off_t </b>types.

       _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
             If <i>sysconf</i>(_SC_V7_ILP32_OFFBIG)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             initial options to be given to the <i>c99</i> utili‐
ty to build an
             application  using  a  programming model with 32‐bit
<b>int</b>, <b>long</b>,
             and <b>pointer </b>types, and an  <b>off_t  </b>type
using at least 64 bits.

       _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
             If  <i>sysconf</i>(_SC_V7_ILP32_OFFBIG)  returns −1,
the meaning of this
             value is unspecified. Otherwise, this value  is  the
set of final
             options  to  be  given  to the <i>c99</i> utility to
build an application
             using a programming model  with  32‐bit  <b>int</b>,
<b>long</b>, and <b>pointer</b>
             types,  and  an  <b>off_t </b>type using at least 64
bits.

       _CS_POSIX_V7_ILP32_OFFBIG_LIBS
             If <i>sysconf</i>(_SC_V7_ILP32_OFFBIG)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             libraries to be given to the <i>c99</i>  utility  to
build an
             application  using  a  programming model with 32‐bit
<b>int</b>, <b>long</b>,
             and <b>pointer </b>types, and an  <b>off_t  </b>type
using at least 64 bits.

       _CS_POSIX_V7_LP64_OFF64_CFLAGS
             If <i>sysconf</i>(_SC_V7_LP64_OFF64) returns −1, the
meaning of this
             value is unspecified. Otherwise, this value  is  the
set of
             initial options to be given to the <i>c99</i> utili‐
ty to build an
             application using a programming  model  with  32‐bit
<b>int </b>and
             64‐bit  <b>long</b>,  <b>pointer</b>,  and  <b>off_t
</b>types.

       _CS_POSIX_V7_LP64_OFF64_LDFLAGS
             If <i>sysconf</i>(_SC_V7_LP64_OFF64) returns −1, the
meaning of this
             value  is  unspecified. Otherwise, this value is the
set of final
             options to be given to  the  <i>c99</i>  utility  to
build an application
             using a programming model with 32‐bit <b>int </b>and
64‐bit <b>long</b>,
             <b>pointer</b>, and <b>off_t </b>types.

       _CS_POSIX_V7_LP64_OFF64_LIBS
             If <i>sysconf</i>(_SC_V7_LP64_OFF64) returns −1, the
meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             libraries to be given to the <i>c99</i>  utility  to
build an
             application  using  a  programming model with 32‐bit
<b>int </b>and
             64‐bit  <b>long</b>,  <b>pointer</b>,  and  <b>off_t
</b>types.

       _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
             If  <i>sysconf</i>(_SC_V7_LPBIG_OFFBIG)  returns −1,
the meaning of this
             value is unspecified. Otherwise, this value  is  the
set of
             initial options to be given to the <i>c99</i> utili‐
ty to build an
             application using a programming model with an <b>int
</b>type using at
             least  32  bits and <b>long</b>, <b>pointer</b>, and
<b>off_t </b>types using at least
             64 bits.

       _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
             If <i>sysconf</i>(_SC_V7_LPBIG_OFFBIG)  returns  −1,
the meaning of this
             value  is  unspecified. Otherwise, this value is the
set of final
             options to be given to  the  <i>c99</i>  utility  to
build an application
             using  a  programming  model with an <b>int </b>type
using at least 32
             bits and <b>long</b>, <b>pointer</b>,  and  <b>off_t
</b>types using at least 64 bits.

       _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
             If  <i>sysconf</i>(_SC_V7_LPBIG_OFFBIG)  returns −1,
the meaning of this
             value is unspecified. Otherwise, this value  is  the
set of
             libraries  to  be given to the <i>c99</i> utility to
build an
             application using a programming model with an <b>int
</b>type using at
             least  32  bits and <b>long</b>, <b>pointer</b>, and
<b>off_t </b>types using at least
             64 bits.

       _CS_POSIX_V7_THREADS_CFLAGS
             If <i>sysconf</i>(_SC_POSIX_THREADS) returns −1, the
meaning of this
             value  is  unspecified. Otherwise, this value is the
set of
             initial options to be given to the <i>c99</i> utili‐
ty to build a
             multi‐threaded application. These flags are in addi‐
tion to
             those   associated   with   any   of    the    other
_CS_POSIX_V7_*_CFLAGS
             values used to specify particular type size program‐
ing
             environments.

       _CS_POSIX_V7_THREADS_LDFLAGS
             If <i>sysconf</i>(_SC_POSIX_THREADS) returns −1, the
meaning of this
             value  is  unspecified. Otherwise, this value is the
set of final
             options to be given to  the  <i>c99</i>  utility  to
build a multi‐
             threaded application. These flags are in addition to
those
             associated with any of the other  _CS_POSIX_V7_*_LD‐
FLAGS values
             used  to specify particular type size programing en‐
vironments.

       _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
             This value is a  &lt;newline&gt;‐separated  list  of
names of
             programming  environments supported by the implemen‐
tation in
             which   the   widths   of   the    <b>blksize_t</b>,
<b>cc_t</b>, <b>mode_t</b>, <b>nfds_t</b>, <b>pid_t</b>,
             <b>ptrdiff_t</b>,   <b>size_t</b>,   <b>speed_t</b>,
<b>ssize_t</b>, <b>suseconds_t</b>, <b>tcflag_t</b>,
             <b>wchar_t</b>,  and  <b>wint_t  </b>types  are   no
greater than the width of type
             <b>long</b>.  The format of each name shall be suit‐
able for use with
             the <i>getconf</i> <b>−v </b>option.

       _CS_V7_ENV
             This is the  value  that  provides  the  environment
variable
             information  (other  than that provided by _CS_PATH)
that is
             required by the implementation to create a  conform‐
ing
             environment,  as  described  in the implementation’s
conformance
             documentation.

       The following symbolic constants are reserved for compati‐
bility with
       Issue 6:

       _CS_POSIX_V6_ILP32_OFF32_CFLAGS
       _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
       _CS_POSIX_V6_ILP32_OFF32_LIBS
       _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
       _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
       _CS_POSIX_V6_ILP32_OFFBIG_LIBS
       _CS_POSIX_V6_LP64_OFF64_CFLAGS
       _CS_POSIX_V6_LP64_OFF64_LDFLAGS
       _CS_POSIX_V6_LP64_OFF64_LIBS
       _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
       _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
       _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
       _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
       _CS_V6_ENV

       The  <i>&lt;unistd.h&gt;</i> header shall define SEEK_CUR,
SEEK_END, and SEEK_SET
       as described in <i>&lt;stdio.h&gt;</i>.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constants
       as possible values for the <i>function</i> argument to the
<i>lockf</i>() function:

       F_LOCK      Lock a section for exclusive use.

       F_TEST      Test section for locks by other processes.

       F_TLOCK     Test and lock a section for exclusive use.

       F_ULOCK     Unlock locked sections.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constants
       for <i>pathconf</i>():

       _PC_2_SYMLINKS
       _PC_ALLOC_SIZE_MIN
       _PC_ASYNC_IO
       _PC_CHOWN_RESTRICTED
       _PC_FILESIZEBITS
       _PC_LINK_MAX
       _PC_MAX_CANON
       _PC_MAX_INPUT
       _PC_NAME_MAX
       _PC_NO_TRUNC
       _PC_PATH_MAX
       _PC_PIPE_BUF
       _PC_PRIO_IO
       _PC_REC_INCR_XFER_SIZE
       _PC_REC_MAX_XFER_SIZE
       _PC_REC_MIN_XFER_SIZE
       _PC_REC_XFER_ALIGN
       _PC_SYMLINK_MAX
       _PC_SYNC_IO
       _PC_TIMESTAMP_RESOLUTION
       _PC_VDISABLE

       The  <i>&lt;unistd.h&gt;</i>  header shall define the fol‐
lowing symbolic constants
       for <i>sysconf</i>():

       _SC_2_C_BIND
       _SC_2_C_DEV
       _SC_2_CHAR_TERM
       _SC_2_FORT_DEV
       _SC_2_FORT_RUN
       _SC_2_LOCALEDEF
       _SC_2_PBS
       _SC_2_PBS_ACCOUNTING
       _SC_2_PBS_CHECKPOINT
       _SC_2_PBS_LOCATE
       _SC_2_PBS_MESSAGE
       _SC_2_PBS_TRACK
       _SC_2_SW_DEV
       _SC_2_UPE
       _SC_2_VERSION
       _SC_ADVISORY_INFO
       _SC_AIO_LISTIO_MAX
       _SC_AIO_MAX
       _SC_AIO_PRIO_DELTA_MAX
       _SC_ARG_MAX
       _SC_ASYNCHRONOUS_IO
       _SC_ATEXIT_MAX
       _SC_BARRIERS
       _SC_BC_BASE_MAX
       _SC_BC_DIM_MAX
       _SC_BC_SCALE_MAX
       _SC_BC_STRING_MAX
       _SC_CHILD_MAX
       _SC_CLK_TCK
       _SC_CLOCK_SELECTION
       _SC_COLL_WEIGHTS_MAX
       _SC_CPUTIME
       _SC_DELAYTIMER_MAX
       _SC_EXPR_NEST_MAX
       _SC_FSYNC
       _SC_GETGR_R_SIZE_MAX
       _SC_GETPW_R_SIZE_MAX
       _SC_HOST_NAME_MAX
       _SC_IOV_MAX
       _SC_IPV6
       _SC_JOB_CONTROL
       _SC_LINE_MAX
       _SC_LOGIN_NAME_MAX
       _SC_MAPPED_FILES
       _SC_MEMLOCK
       _SC_MEMLOCK_RANGE
       _SC_MEMORY_PROTECTION
       _SC_MESSAGE_PASSING
       _SC_MONOTONIC_CLOCK
       _SC_MQ_OPEN_MAX
       _SC_MQ_PRIO_MAX
       _SC_NGROUPS_MAX
       _SC_OPEN_MAX
       _SC_PAGE_SIZE
       _SC_PAGESIZE
       _SC_PRIORITIZED_IO
       _SC_PRIORITY_SCHEDULING
       _SC_RAW_SOCKETS
       _SC_RE_DUP_MAX
       _SC_READER_WRITER_LOCKS
       _SC_REALTIME_SIGNALS
       _SC_REGEXP
       _SC_RTSIG_MAX
       _SC_SAVED_IDS
       _SC_SEM_NSEMS_MAX
       _SC_SEM_VALUE_MAX
       _SC_SEMAPHORES
       _SC_SHARED_MEMORY_OBJECTS
       _SC_SHELL
       _SC_SIGQUEUE_MAX
       _SC_SPAWN
       _SC_SPIN_LOCKS
       _SC_SPORADIC_SERVER
       _SC_SS_REPL_MAX
       _SC_STREAM_MAX
       _SC_SYMLOOP_MAX
       _SC_SYNCHRONIZED_IO
       _SC_THREAD_ATTR_STACKADDR
       _SC_THREAD_ATTR_STACKSIZE
       _SC_THREAD_CPUTIME
       _SC_THREAD_DESTRUCTOR_ITERATIONS
       _SC_THREAD_KEYS_MAX
       _SC_THREAD_PRIO_INHERIT
       _SC_THREAD_PRIO_PROTECT
       _SC_THREAD_PRIORITY_SCHEDULING
       _SC_THREAD_PROCESS_SHARED
       _SC_THREAD_ROBUST_PRIO_INHERIT
       _SC_THREAD_ROBUST_PRIO_PROTECT
       _SC_THREAD_SAFE_FUNCTIONS
       _SC_THREAD_SPORADIC_SERVER
       _SC_THREAD_STACK_MIN
       _SC_THREAD_THREADS_MAX
       _SC_THREADS
       _SC_TIMEOUTS
       _SC_TIMER_MAX
       _SC_TIMERS
       _SC_TRACE
       _SC_TRACE_EVENT_FILTER
       _SC_TRACE_EVENT_NAME_MAX
       _SC_TRACE_INHERIT
       _SC_TRACE_LOG
       _SC_TRACE_NAME_MAX
       _SC_TRACE_SYS_MAX
       _SC_TRACE_USER_EVENT_MAX
       _SC_TTY_NAME_MAX
       _SC_TYPED_MEMORY_OBJECTS
       _SC_TZNAME_MAX
       _SC_V7_ILP32_OFF32
       _SC_V7_ILP32_OFFBIG
       _SC_V7_LP64_OFF64
       _SC_V7_LPBIG_OFFBIG
       _SC_V6_ILP32_OFF32
       _SC_V6_ILP32_OFFBIG
       _SC_V6_LP64_OFF64
       _SC_V6_LPBIG_OFFBIG
       _SC_VERSION
       _SC_XOPEN_CRYPT
       _SC_XOPEN_ENH_I18N
       _SC_XOPEN_REALTIME
       _SC_XOPEN_REALTIME_THREADS
       _SC_XOPEN_SHM
       _SC_XOPEN_STREAMS
       _SC_XOPEN_UNIX
       _SC_XOPEN_UUCP
       _SC_XOPEN_VERSION

       The two constants _SC_PAGESIZE and  _SC_PAGE_SIZE  may  be
defined to
       have the same value.

       The  <i>&lt;unistd.h&gt;</i>  header shall define the fol‐
lowing symbolic constants
       for file streams:

       STDERR_FILENO File number of <i>stderr</i>; 2.

       STDIN_FILENO  File number of <i>stdin</i>; 0.

       STDOUT_FILENO File number of <i>stdout</i>; 1.

       The <i>&lt;unistd.h&gt;</i> header shall define  the  fol‐
lowing symbolic constant
       for terminal special character handling:

       _POSIX_VDISABLE
                     This symbol shall be defined to be the value
of a
                     character that shall disable  terminal  spe‐
cial character
                     handling    as   described   in   <i>Section
11.2.6</i>, <i>Special</i>
                     <i>Control  Characters</i>.    This   symbol
shall always be set to
                     a value other than −1.

   <b>Type Definitions</b>
       The   <i>&lt;unistd.h&gt;</i>   header  shall  define  the
<b>size_t</b>, <b>ssize_t</b>, <b>uid_t</b>, <b>gid_t</b>,
       <b>off_t</b>,  and  <b>pid_t  </b>types  as  described  in
<i>&lt;sys/types.h&gt;</i>.

       The   <i>&lt;unistd.h&gt;</i>   header  shall  define  the
<b>intptr_t </b>type as described in
       <i>&lt;inttypes.h&gt;</i>.

   <b>Declarations</b>
       The following shall be declared as functions and may  also
be defined
       as macros. Function prototypes shall be provided.

           <b>int          access(const char *, int);</b>
           <b>unsigned     alarm(unsigned);</b>
           <b>int          chdir(const char *);</b>
           <b>int          chown(const char *, uid_t, gid_t);</b>
           <b>int          close(int);</b>
           <b>size_t       confstr(int, char *, size_t);</b>
           <b>char        *crypt(const char *, const char *);</b>
           <b>int          dup(int);</b>
           <b>int          dup2(int, int);</b>
           <b>void         _exit(int);</b>
           <b>void         encrypt(char [64], int);</b>
           <b>int           execl(const  char  *,  const  char *,
...);</b>
           <b>int          execle(const char  *,  const  char  *,
...);</b>
           <b>int           execlp(const  char  *,  const char *,
...);</b>
           <b>int           execv(const  char  *,   char   *const
[]);</b>
           <b>int           execve(const  char *, char *const [],
char *const []);</b>
           <b>int           execvp(const  char  *,  char   *const
[]);</b>
           <b>int           faccessat(int,  const  char  *,  int,
int);</b>
           <b>int          fchdir(int);</b>
           <b>int          fchown(int, uid_t, gid_t);</b>
           <b>int          fchownat(int,  const  char  *,  uid_t,
gid_t, int);</b>
           <b>int          fdatasync(int);</b>
           <b>int           fexecve(int,  char  *const  [],  char
*const []);</b>
           <b>pid_t        fork(void);</b>
           <b>long         fpathconf(int, int);</b>
           <b>int          fsync(int);</b>
           <b>int          ftruncate(int, off_t);</b>
           <b>char        *getcwd(char *, size_t);</b>
           <b>gid_t        getegid(void);</b>
           <b>uid_t        geteuid(void);</b>
           <b>gid_t        getgid(void);</b>
           <b>int          getgroups(int, gid_t []);</b>
           <b>long         gethostid(void);</b>
           <b>int          gethostname(char *, size_t);</b>
           <b>char        *getlogin(void);</b>
           <b>int          getlogin_r(char *, size_t);</b>
           <b>int          getopt(int, char  *  const  [],  const
char *);</b>
           <b>pid_t        getpgid(pid_t);</b>
           <b>pid_t        getpgrp(void);</b>
           <b>pid_t        getpid(void);</b>
           <b>pid_t        getppid(void);</b>
           <b>pid_t        getsid(pid_t);</b>
           <b>uid_t        getuid(void);</b>
           <b>int          isatty(int);</b>
           <b>int             lchown(const    char    *,   uid_t,
gid_t);</b>
           <b>int          link(const char *, const char *);</b>
           <b>int          linkat(int, const char *,  int,  const
char *, int);</b>
           <b>int          lockf(int, int, off_t);</b>
           <b>off_t        lseek(int, off_t, int);</b>
           <b>int          nice(int);</b>
           <b>long         pathconf(const char *, int);</b>
           <b>int          pause(void);</b>
           <b>int          pipe(int [2]);</b>
           <b>ssize_t      pread(int, void *, size_t, off_t);</b>
           <b>ssize_t       pwrite(int,  const  void  *,  size_t,
off_t);</b>
           <b>ssize_t      read(int, void *, size_t);</b>
           <b>ssize_t      readlink(const  char  *restrict,  char
*restrict, size_t);</b>
           <b>ssize_t       readlinkat(int, const char *restrict,
char *restrict, size_t);</b>
           <b>int          rmdir(const char *);</b>
           <b>int          setegid(gid_t);</b>
           <b>int          seteuid(uid_t);</b>
           <b>int          setgid(gid_t);</b>
           <b>int          setpgid(pid_t, pid_t);</b>
           <b>pid_t        setpgrp(void);</b>
           <b>int          setregid(gid_t, gid_t);</b>
           <b>int          setreuid(uid_t, uid_t);</b>
           <b>pid_t        setsid(void);</b>
           <b>int          setuid(uid_t);</b>
           <b>unsigned     sleep(unsigned);</b>
           <b>void         swab(const void *restrict,  void  *re‐
strict, ssize_t);</b>
           <b>int            symlink(const  char  *,  const  char
*);</b>
           <b>int          symlinkat(const  char  *,  int,  const
char *);</b>
           <b>void         sync(void);</b>
           <b>long         sysconf(int);</b>
           <b>pid_t        tcgetpgrp(int);</b>
           <b>int          tcsetpgrp(int, pid_t);</b>
           <b>int          truncate(const char *, off_t);</b>
           <b>char        *ttyname(int);</b>
           <b>int          ttyname_r(int, char *, size_t);</b>
           <b>int          unlink(const char *);</b>
           <b>int          unlinkat(int, const char *, int);</b>
           <b>ssize_t      write(int, const void *, size_t);</b>

       Implementations   may   also  include  the  <i>pthread_at‐
fork</i>() prototype as
       defined in <i>&lt;pthread.h&gt;</i>.  Implementations  may
also include the
       <i>ctermid</i>()      prototype      as     defined     in
<i>&lt;stdio.h&gt;</i>.

       The <i>&lt;unistd.h&gt;</i> header shall declare the  fol‐
lowing external variables:

           <b>extern char  *optarg;</b>
           <b>extern int    opterr, optind, optopt;</b>

       <i>The  following  sections  are  informative.</i>  </pre>
<h2><a  id="APPLICATION_USAGE"  href="#APPLICATION_USAGE"></a>AP‐
PLICATION    USAGE     &nbsp;    &nbsp;    &nbsp;    &nbsp;    <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       POSIX.1‐2008  only  describes the behavior of systems that
claim
       conformance to it.  However,  application  developers  who
want to write
       applications that adapt to other versions of this standard
(or to
       systems that do not conform to  any  POSIX  standard)  may
find it useful
       to code them so as to conditionally compile different code
depending
       on the value of _POSIX_VERSION, for example:

           <b>#if _POSIX_VERSION &gt;= 200112L</b>
           <b>/* Use the newer function  that  copes  with  large
files. */</b>
           <b>off_t pos=ftello(fp);</b>
           <b>#else</b>
           <b>/*  Either  this  is  an  old  version of POSIX, or
_POSIX_VERSION is</b>
              <b>not even defined, so use the  traditional  func‐
tion. */</b>
           <b>long pos=ftell(fp);</b>
           <b>#endif</b>

       Earlier  versions  of  POSIX.1‐2008 and of the Single UNIX
Specification
       can be identified by the following macros:

       POSIX.1‐1988 standard
             _POSIX_VERSION==198808L

       POSIX.1‐1990 standard
             _POSIX_VERSION==199009L

       ISO POSIX‐1:1996 standard
             _POSIX_VERSION==199506L

       Single UNIX Specification, Version 1
             _XOPEN_UNIX and _XOPEN_VERSION==4

       Single UNIX Specification, Version 2
             _XOPEN_UNIX and _XOPEN_VERSION==500

       ISO POSIX‐1:2001 and Single UNIX Specification, Version 3
             _POSIX_VERSION==200112L, plus (if the XSI option  is
supported)
             _XOPEN_UNIX and _XOPEN_VERSION==600

       POSIX.1‐2008  does not make any attempt to define applica‐
tion binary
       interaction with the underlying operating system. However,
       application  developers  may  find  it  useful  to   query
_SC_VERSION at
       runtime via <i>sysconf</i>() to determine whether the cur‐
rent version of the
       operating system supports the necessary  functionality  as
in the
       following program fragment:

           <b>if (sysconf(_SC_VERSION) &lt; 200809L) {</b>
               <b>fprintf(stderr,  "POSIX.1‐2008 system required,
terminating 0);</b>
               <b>exit(1);</b>
           <b>}</b>

       New   applications   should   not   use   _XOPEN_SHM    or
_XOPEN_ENH_I18N.    </pre>  <h2><a  id="RATIONALE"  href="#RATIO‐
NALE"></a>RATIONALE    &nbsp;    &nbsp;    &nbsp;    &nbsp;    <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       As POSIX.1‐2008 evolved,  certain  options  became  suffi‐
ciently
       standardized  that  it was concluded that simply requiring
one of the
       option choices was simpler than retaining the option. How‐
ever, for
       backwards‐compatibility,  the  option flags (with required
constant
       values) are retained.

   <b>Version Test Macros</b>
       The standard developers considered altering the definition
of
       _POSIX_VERSION  and removing _SC_VERSION from the specifi‐
cation of
       <i>sysconf</i>() since the utility to an  application  was
deemed by some to
       be  minimal, and since the implementation of the function‐
ality is
       potentially problematic.  However,  they  recognized  that
support for
       existing  application binaries is a concern to manufactur‐
ers,
       application developers, and the users  of  implementations
conforming
       to POSIX.1‐2008.

       While the example using _SC_VERSION in the APPLICATION US‐
AGE section
       does not provide the greatest degree of imaginable utility
to the
       application  developer or user, it is arguably better than
a <b>core </b>file
       or some other equally obscure result. (It is also possible
for
       implementations  to encode and recognize application bina‐
ries compiled
       in various POSIX.1‐conforming environments, and modify the
semantics
       of the underlying system to conform to the expectations of
the
       application.) For the reasons outlined  in  the  preceding
paragraphs
       and  in the APPLICATION USAGE section, the standard devel‐
opers elected
       to retain the _POSIX_VERSION and _SC_VERSION  functionali‐
ty.

   <b>Compile‐Time Symbolic Constants for System‐Wide Options</b>
       POSIX.1‐2008  includes  support  in  certain areas for the
newly adopted
       policy governing options and stubs.

       This policy provides flexibility  for  implementations  in
how they
       support options. It also specifies how conforming applica‐
tions can
       adapt to different implementations that support  different
sets of
       options. It allows the following:

        1.  If an implementation has no interest in supporting an
option, it
           does not have to provide anything associated with that
option
           beyond the announcement that it does not support it.

        2.  An implementation can support a partial or incompati‐
ble version
           of an option (as a non‐standard extension) as long  as
it does not
           claim to support the option.

        3.  An  application  can  determine whether the option is
supported. A
           strictly conforming application must  check  this  an‐
nouncement
           mechanism  before first using anything associated with
the option.

       There  is  an  important  implication  of   this   policy.
POSIX.1‐2008 cannot
       dictate  the behavior of interfaces associated with an op‐
tion when the
       implementation does not claim to support  the  option.  In
particular,
       it  cannot  require that a function associated with an un‐
supported
       option will fail if it does not perform as specified. How‐
ever, this
       policy  does not prevent a standard from requiring certain
functions
       to always be present, but that they shall always  fail  on
some
       implementations.   The  <i>setpgid</i>()  function  in the
POSIX.1‐1990
       standard, for example, is considered appropriate.

       The POSIX standards include various options,  and  the  C‐
language
       binding support for an option implies that the implementa‐
tion must
       supply data types and function interfaces. An  application
must be
       able  to discover whether the implementation supports each
option.

       Any application must consider the  following  three  cases
for each
       option:

        1. Option never supported.

           The implementation advertises at compile time that the
option
           will never be supported. In this case, it is not  nec‐
essary for
           the  implementation to supply any of the data types or
function
           interfaces that are provided only as part of  the  op‐
tion. The
           implementation  might provide data types and functions
that are
           similar to those defined by POSIX.1‐2008, but there is
no
           guarantee for any particular behavior.

        2. Option always supported.

           The implementation advertises at compile time that the
option
           will always be supported. In this case, all data types
and
           function interfaces shall be available and shall oper‐
ate as
           specified.

        3. Option might or might not be supported.

           Some implementations might not provide a mechanism  to
specify
           support of options at compile time. In addition, the
           implementation might be unable or unwilling to specify
support or
           non‐support at compile time.  In either case, any  ap‐
plication
           that  might  use the option at runtime must be able to
compile and
           execute. The implementation must provide,  at  compile
time, all
           data  types and function interfaces that are necessary
to allow
           this. In this situation, there  must  be  a  mechanism
that allows
           the  application to query, at runtime, whether the op‐
tion is
           supported. If the application attempts to use the  op‐
tion when it
           is not supported, the result is unspecified unless ex‐
plicitly
           specified otherwise in  POSIX.1‐2008.   </pre>  <h2><a
id="FUTURE_DIRECTIONS"  href="#FUTURE_DIRECTIONS"></a>FUTURE  DI‐
RECTIONS       &nbsp;      &nbsp;      &nbsp;      &nbsp;      <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       None.    </pre>   <h2><a   id="SEE_ALSO"    href="#SEE_AL‐
SO"></a>SEE    ALSO     &nbsp;    &nbsp;    &nbsp;    &nbsp;   <a
href="#top_of_page"><span                             class="top‐
link">top</span></a></h2><pre>
       <a   href="../man0/inttypes.h.0p.html">inttypes.h(0p)</a>,
<a      href="../man0/limits.h.0p.html">limits.h(0p)</a>,      <a
href="../man0/stddef.h.0p.html">stddef.h(0p)</a>,              <a
href="../man0/stdio.h.0p.html">stdio.h(0p)</a>,
       <a           href="../man0/sys_socket.h.0p.html">sys_sock‐
et.h(0p)</a>,                                                  <a
href="../man0/sys_types.h.0p.html">sys_types.h(0p)</a>,        <a
href="../man0/termios.h.0p.html">termios.h(0p)</a>,            <a
href="../man0/wctype.h.0p.html">wctype.h(0p)</a>

       The  System  Interfaces   volume   of   POSIX.1‐2008,   <a
href="../man3/access.3p.html">access(3p)</a>,                  <a
href="../man3/alarm.3p.html">alarm(3p)</a>,
       <a     href="../man3/chown.3p.html">chown(3p)</a>,      <a
href="../man3/close.3p.html">close(3p)</a>, <a href="../man3/con‐
fstr.3p.html">confstr(3p)</a>,                                 <a
href="../man3/crypt.3p.html">crypt(3p)</a>,                    <a
href="../man3/ctermid.3p.html">ctermid(3p)</a>,                <a
href="../man3/dup.3p.html">dup(3p)</a>,
       <a      href="../man3/_Exit.3p.html">_Exit(3p)</a>,     <a
href="../man3/encrypt.3p.html">encrypt(3p)</a>,                <a
href="../man1/exec.1p.html">exec(1p)</a>,                      <a
href="../man3/fchdir.3p.html">fchdir(3p)</a>,                  <a
href="../man3/fchown.3p.html">fchown(3p)</a>,
       <a  href="../man3/fdatasync.3p.html">fdatasync(3p)</a>, <a
href="../man3/fork.3p.html">fork(3p)</a>, <a href="../man3/fpath‐
conf.3p.html">fpathconf(3p)</a>,                               <a
href="../man3/fsync.3p.html">fsync(3p)</a>,                    <a
href="../man3/ftruncate.3p.html">ftruncate(3p)</a>,
       <a     href="../man3/getcwd.3p.html">getcwd(3p)</a>,    <a
href="../man3/getegid.3p.html">getegid(3p)</a>,                <a
href="../man3/geteuid.3p.html">geteuid(3p)</a>,                <a
href="../man3/getgid.3p.html">getgid(3p)</a>,                  <a
href="../man3/getgroups.3p.html">getgroups(3p)</a>,
       <a  href="../man3/gethostid.3p.html">gethostid(3p)</a>, <a
href="../man3/gethostname.3p.html">gethostname(3p)</a>,        <a
href="../man3/getlogin.3p.html">getlogin(3p)</a>,              <a
href="../man3/getopt.3p.html">getopt(3p)</a>,
       <a   href="../man3/getpgid.3p.html">getpgid(3p)</a>,    <a
href="../man3/getpgrp.3p.html">getpgrp(3p)</a>,                <a
href="../man3/getpid.3p.html">getpid(3p)</a>,                  <a
href="../man3/getppid.3p.html">getppid(3p)</a>,                <a
href="../man3/getsid.3p.html">getsid(3p)</a>,
       <a    href="../man3/getuid.3p.html">getuid(3p)</a>,     <a
href="../man3/isatty.3p.html">isatty(3p)</a>,                  <a
href="../man3/lchown.3p.html">lchown(3p)</a>,                  <a
href="../man3/link.3p.html">link(3p)</a>,                      <a
href="../man3/lockf.3p.html">lockf(3p)</a>,                    <a
href="../man3/lseek.3p.html">lseek(3p)</a>,
       <a       href="../man3/nice.3p.html">nice(3p)</a>,      <a
href="../man3/pause.3p.html">pause(3p)</a>,                    <a
href="../man3/pipe.3p.html">pipe(3p)</a>,                      <a
href="../man3/read.3p.html">read(3p)</a>, <a  href="../man3/read‐
link.3p.html">readlink(3p)</a>,                                <a
href="../man3/rmdir.3p.html">rmdir(3p)</a>,
       <a   href="../man3/setegid.3p.html">setegid(3p)</a>,    <a
href="../man3/seteuid.3p.html">seteuid(3p)</a>,                <a
href="../man3/setgid.3p.html">setgid(3p)</a>,                  <a
href="../man3/setpgid.3p.html">setpgid(3p)</a>,                <a
href="../man3/setpgrp.3p.html">setpgrp(3p)</a>,
       <a  href="../man3/setregid.3p.html">setregid(3p)</a>,   <a
href="../man3/setreuid.3p.html">setreuid(3p)</a>,              <a
href="../man3/setsid.3p.html">setsid(3p)</a>,                  <a
href="../man3/setuid.3p.html">setuid(3p)</a>,                  <a
href="../man3/sleep.3p.html">sleep(3p)</a>,
       <a      href="../man3/swab.3p.html">swab(3p)</a>,       <a
href="../man3/symlink.3p.html">symlink(3p)</a>,                <a
href="../man3/sync.3p.html">sync(3p)</a>,                      <a
href="../man3/sysconf.3p.html">sysconf(3p)</a>,                <a
href="../man3/tcgetpgrp.3p.html">tcgetpgrp(3p)</a>,
       <a href="../man3/tcsetpgrp.3p.html">tcsetpgrp(3p)</a>,  <a
href="../man3/truncate.3p.html">truncate(3p)</a>,              <a
href="../man3/ttyname.3p.html">ttyname(3p)</a>,                <a
href="../man3/unlink.3p.html">unlink(3p)</a>,                  <a
href="../man3/write.3p.html">write(3p)</a>     </pre>      <h2><a
id="COPYRIGHT"   href="#COPYRIGHT"></a>COPYRIGHT   &nbsp;  &nbsp;
&nbsp;   &nbsp;    <a    href="#top_of_page"><span    class="top‐
link">top</span></a></h2><pre>
       Portions  of  this  text  are  reprinted and reproduced in
electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for  Informa‐
tion
       Technology ‐‐ Portable Operating System Interface (POSIX),
The Open
       Group Base Specifications Issue 7, Copyright (C)  2013  by
the
       Institute of Electrical and Electronics Engineers, Inc and
The Open
       Group.  (This is POSIX.1‐2008 with the 2013 Technical Cor‐
rigendum 1
       applied.)  In  the  event  of any discrepancy between this
version and
       the original IEEE and The Open Group Standard, the  origi‐
nal IEEE and
       The Open Group Standard is the referee document. The orig‐
inal
       Standard    can    be    obtained     online     at     <a
href="http://www.unix.org/online.html">http://www.unix.org/on‐
line.html</a> .

       Any typographical or formatting errors that appear in this
page are
       most  likely to have been introduced during the conversion
of the
       source files to man page format. To  report  such  errors,
see
       <a      href="https://www.kernel.org/doc/man‐pages/report‐
ing_bugs.html">https://www.kernel.org/doc/man‐pages/report‐
ing_bugs.html</a> .

<span  class="footline">IEEE/The  Open Group                 2013
unistd.h(0P)</span> </pre>

<hr class="end‐man‐text" />

<hr class="start‐footer" />

<div class="footer">

<table class="colophon‐table">
    <tr>
    <td class="pub‐info">
        <p>
            HTML rendering created 2019‐08‐02
            by  <a  href="http://man7.org/mtk/index.html">Michael
Kerrisk</a>,
            author of
            <a  href="http://man7.org/tlpi/"><em>The  Linux  Pro‐
gramming Interface</em></a>,
            maintainer of the
            <a href="https://www.kernel.org/doc/man‐pages/">Linux
<em>man‐pages</em> project</a>.
        </p>
        <p>
            For details of in‐depth
            <strong>Linux/UNIX  system programming training cour‐
ses</strong>
            that I teach,  look  <a  href="http://man7.org/train‐
ing/">here</a>.
        </p>
        <p>
            Hosting    by    <a   href="http://www.jambit.com/in‐
dex_en.html">jambit GmbH</a>.
        </p>
        <p>
            <a href="http://validator.w3.org/check?uri=referer">
            <img src="http://www.w3.org/Icons/valid‐xhtml11"
                alt="Valid XHTML 1.1" height="31" width="88" />
            </a>
        </p>
    </td>
    <td class="colophon‐divider">
    </td>
    <td class="tlpi‐cover">
        <a                      href="http://man7.org/tlpi/"><img
src="http://man7.org/tlpi/cover/TLPI‐front‐cover‐vsmall.png"
alt="Cover of TLPI" /></a>
    </td>
    </tr> </table>

</div>

<hr class="end‐footer" />

</body> </html>