⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unistd.h.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>&lt;unistd.h&gt;</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="&lt;unistd.h&gt;"></a> <a name="tag_13_80"></a><!-- &lt;unistd.h&gt; --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_13_80_01"></a>NAME</h4><blockquote>unistd.h - standard symbolic constants and types</blockquote><h4><a name="tag_13_80_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><tt>#include &lt;unistd.h&gt;</tt></p></blockquote><h4><a name="tag_13_80_03"></a>DESCRIPTION</h4><blockquote><p>The <i>&lt;unistd.h&gt;</i> header defines miscellaneous symbolic constants and types, and declares miscellaneous functions. Theactual values of the constants are unspecified except as shown. The contents of this header are shown below.</p><h5><a name="tag_13_80_03_01"></a>Version Test Macros</h5><p>The following symbolic constants shall be defined:</p><dl compact><dt>_POSIX_VERSION</dt><dd>Integer value indicating version of IEEE&nbsp;Std&nbsp;1003.1 (C-language binding) to which the implementation conforms. Forimplementations conforming to IEEE&nbsp;Std&nbsp;1003.1-2001, the value shall be 200112L.</dd><dt>_POSIX2_VERSION</dt><dd>Integer value indicating version of the Shell and Utilities volume of IEEE&nbsp;Std&nbsp;1003.1 to which the implementationconforms. For implementations conforming to IEEE&nbsp;Std&nbsp;1003.1-2001, the value shall be 200112L.</dd></dl><p>The following symbolic constant shall be defined only if the implementation supports the XSI option; see <a href="xbd_chap02.html#tag_02_01_04"><i>XSI Conformance</i></a> .</p><dl compact><dt>_XOPEN_VERSION</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>Integer value indicating version of the X/Open Portability Guide to which the implementation conforms. The value shall be 600. <imgsrc="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl><h5><a name="tag_13_80_03_02"></a>Constants for Options and Option Groups</h5><p>The following symbolic constants, if defined in <i>&lt;unistd.h&gt;</i>, shall have a value of -1, 0, or greater, unlessotherwise specified below. If these are undefined, the <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a>, <a href="../functions/pathconf.html"><i>pathconf</i>()</a>, or <a href="../functions/sysconf.html"><i>sysconf</i>()</a> functions can beused to determine whether the option is provided for a particular invocation of the application.</p><p>If a symbolic constant is defined with the value -1, the option is not supported. Headers, data types, and function interfacesrequired only for the option need not be supplied. An application that attempts to use anything associated only with the option isconsidered to be requiring an extension.</p><p>If a symbolic constant is defined with a value greater than zero, the option shall always be supported when the application isexecuted. All headers, data types, and functions shall be present and shall operate as specified.</p><p>If a symbolic constant is defined with the value zero, all headers, data types, and functions shall be present. The applicationcan check at runtime to see whether the option is supported by calling <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a>, <a href="../functions/pathconf.html"><i>pathconf</i>()</a>, or <a href="../functions/sysconf.html"><i>sysconf</i>()</a> with the indicated <i>name</i> parameter.</p><p>Unless explicitly specified otherwise, the behavior of functions associated with an unsupported option is unspecified, and anapplication that uses such functions without first checking <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a>, <a href="../functions/pathconf.html"><i>pathconf</i>()</a>, or <a href="../functions/sysconf.html"><i>sysconf</i>()</a> is considered to berequiring an extension.</p><p>For conformance requirements, refer to <a href="xbd_chap02.html#tag_02"><i>Conformance</i></a> .</p><dl compact><dt>_POSIX_ADVISORY_INFO</dt><dd><sup>[<a href="javascript:open_code('ADV')">ADV</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Advisory Information option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_ASYNCHRONOUS_IO</dt><dd><sup>[<a href="javascript:open_code('AIO')">AIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Asynchronous Input and Output option. If this symbol has a value other than -1 or 0, it shall havethe value 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_BARRIERS</dt><dd><sup>[<a href="javascript:open_code('BAR')">BAR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Barriers option. If this symbol has a value other than -1 or 0, it shall have the value 200112L.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_CHOWN_RESTRICTED</dt><dd>The use of <a href="../functions/chown.html"><i>chown</i>()</a> and <a href="../functions/fchown.html"><i>fchown</i>()</a> isrestricted to a process with appropriate privileges, and to changing the group ID of a file only to the effective group ID of theprocess or to one of its supplementary group IDs. This symbol shall always be set to a value other than -1.</dd><dt>_POSIX_CLOCK_SELECTION</dt><dd><sup>[<a href="javascript:open_code('CS')">CS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Clock Selection option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_CPUTIME</dt><dd><sup>[<a href="javascript:open_code('CPT')">CPT</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Process CPU-Time Clocks option. If this symbol has a value other than -1 or 0, it shall have thevalue 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_FSYNC</dt><dd><sup>[<a href="javascript:open_code('FSC')">FSC</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the File Synchronization option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_IPV6</dt><dd>The implementation supports the IPv6 option. If this symbol has a value other than -1 or 0, it shall have the value 200112L.</dd><dt>_POSIX_JOB_CONTROL</dt><dd>The implementation supports job control. This symbol shall always be set to a value greater than zero.</dd><dt>_POSIX_MAPPED_FILES</dt><dd><sup>[<a href="javascript:open_code('MF')">MF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Memory Mapped Files option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_MEMLOCK</dt><dd><sup>[<a href="javascript:open_code('ML')">ML</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Process Memory Locking option. If this symbol has a value other than -1 or 0, it shall have thevalue 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_MEMLOCK_RANGE</dt><dd><sup>[<a href="javascript:open_code('MR')">MR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Range Memory Locking option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_MEMORY_PROTECTION</dt><dd><sup>[<a href="javascript:open_code('MPR')">MPR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Memory Protection option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_MESSAGE_PASSING</dt><dd><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Message Passing option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_MONOTONIC_CLOCK</dt><dd><sup>[<a href="javascript:open_code('MON')">MON</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Monotonic Clock option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_NO_TRUNC</dt><dd>Pathname components longer than {NAME_MAX} generate an error. This symbol shall always be set to a value other than -1.</dd><dt>_POSIX_PRIORITIZED_IO</dt><dd><sup>[<a href="javascript:open_code('PIO')">PIO</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Prioritized Input and Output option. If this symbol has a value other than -1 or 0, it shall havethe value 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_PRIORITY_SCHEDULING</dt><dd><sup>[<a href="javascript:open_code('PS')">PS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Process Scheduling option. If this symbol has a value other than -1 or 0, it shall have the value200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_RAW_SOCKETS</dt><dd><sup>[<a href="javascript:open_code('RS')">RS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Raw Sockets option. If this symbol has a value other than -1 or 0, it shall have the value 200112L.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_READER_WRITER_LOCKS</dt><dd><sup>[<a href="javascript:open_code('THR')">THR</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Read-Write Locks option. This is always set to a value greater than zero if the Threads option issupported. If this symbol has a value other than -1 or 0, it shall have the value 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_REALTIME_SIGNALS</dt><dd><sup>[<a href="javascript:open_code('RTS')">RTS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Realtime Signals Extension option. If this symbol has a value other than -1 or 0, it shall have thevalue 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_REGEXP</dt><dd>The implementation supports the Regular Expression Handling option. This symbol shall always be set to a value greater thanzero.</dd><dt>_POSIX_SAVED_IDS</dt><dd>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.</dd><dt>_POSIX_SEMAPHORES</dt><dd><sup>[<a href="javascript:open_code('SEM')">SEM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Semaphores option. If this symbol has a value other than -1 or 0, it shall have the value 200112L.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_SHARED_MEMORY_OBJECTS</dt><dd><sup>[<a href="javascript:open_code('SHM')">SHM</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Shared Memory Objects option. If this symbol has a value other than -1 or 0, it shall have thevalue 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_SHELL</dt><dd>The implementation supports the POSIX shell. This symbol shall always be set to a value greater than zero.</dd><dt>_POSIX_SPAWN</dt><dd><sup>[<a href="javascript:open_code('SPN')">SPN</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Spawn option. If this symbol has a value other than -1 or 0, it shall have the value 200112L. <imgsrc="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_SPIN_LOCKS</dt><dd><sup>[<a href="javascript:open_code('SPI')">SPI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Spin Locks option. If this symbol has a value other than -1 or 0, it shall have the value 200112L.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_POSIX_SPORADIC_SERVER</dt><dd><sup>[<a href="javascript:open_code('SS')">SS</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the Process Sporadic Server option. If this symbol has a value other than -1 or 0, it shall have thevalue 200112L. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -