📄 unistd.h.html
字号:
The implementation supports the Issue 4, Version 2 Enhanced Internationalization Option Group. This symbol shall always be set to avalue other than -1.</dd><dt>_XOPEN_LEGACY</dt><dd>The implementation supports the Legacy Option Group.</dd><dt>_XOPEN_REALTIME</dt><dd>The implementation supports the X/Open Realtime Option Group.</dd><dt>_XOPEN_REALTIME_THREADS</dt><dd>The implementation supports the X/Open Realtime Threads Option Group.</dd><dt>_XOPEN_SHM</dt><dd>The implementation supports the Issue 4, Version 2 Shared Memory Option Group. This symbol shall always be set to a value otherthan -1.</dd><dt>_XOPEN_STREAMS</dt><dd>The implementation supports the XSI STREAMS Option Group. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>_XOPEN_UNIX</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"><br>The implementation supports the XSI extension. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl><h5><a name="tag_13_80_03_03"></a>Execution-Time Symbolic Constants</h5><p>If any of the following constants are not defined in the <i><unistd.h></i> header, the value shall vary depending on thefile to which it is applied.</p><p>If any of the following constants are defined to have value -1 in the <i><unistd.h></i> header, the implementation shallnot provide the option on any file; if any are defined to have a value other than -1 in the <i><unistd.h></i> header, theimplementation shall provide the option on all applicable files.</p><p>All of the following constants, whether defined in <i><unistd.h></i> or not, may be queried with respect to a specificfile using the <a href="../functions/pathconf.html"><i>pathconf</i>()</a> or <a href="../functions/fpathconf.html"><i>fpathconf</i>()</a> functions:</p><dl compact><dt>_POSIX_ASYNC_IO</dt><dd>Asynchronous input or output operations may be performed for the associated file.</dd><dt>_POSIX_PRIO_IO</dt><dd>Prioritized input or output operations may be performed for the associated file.</dd><dt>_POSIX_SYNC_IO</dt><dd>Synchronized input or output operations may be performed for the associated file.</dd></dl><h5><a name="tag_13_80_03_04"></a>Constants for Functions</h5><p>The following symbolic constant shall be defined:</p><dl compact><dt>NULL</dt><dd>Null pointer</dd></dl><p>The following symbolic constants shall be defined for the <a href="../functions/access.html"><i>access</i>()</a> function:</p><dl compact><dt>F_OK</dt><dd>Test for existence of file.</dd><dt>R_OK</dt><dd>Test for read permission.</dd><dt>W_OK</dt><dd>Test for write permission.</dd><dt>X_OK</dt><dd>Test for execute (search) permission.</dd></dl><p>The constants F_OK, R_OK, W_OK, and X_OK and the expressions <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.</p><p>The following symbolic constants shall be defined for the <a href="../functions/confstr.html"><i>confstr</i>()</a> function:</p><dl compact><dt>_CS_PATH</dt><dd>This is the value for the <i>PATH</i> environment variable that finds all standard utilities.</dd><dt>_CS_POSIX_V6_ILP32_OFF32_CFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set ofinitial options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using aprogramming model with 32-bit <b>int</b>, <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_ILP32_OFF32_LDFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set offinal options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel with 32-bit <b>int</b>, <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_ILP32_OFF32_LIBS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set oflibraries to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel with 32-bit <b>int</b>, <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set ofinitial options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using aprogramming 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 64bits.</dd><dt>_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set offinal options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel 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.</dd><dt>_CS_POSIX_V6_ILP32_OFFBIG_LIBS</dt><dd>If <i>sysconf</i>(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set oflibraries to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel 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.</dd><dt>_CS_POSIX_V6_LP64_OFF64_CFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set ofinitial options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using aprogramming model with 32-bit <b>int</b> and 64-bit <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_LP64_OFF64_LDFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set offinal options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel with 32-bit <b>int</b> and 64-bit <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_LP64_OFF64_LIBS</dt><dd>If <i>sysconf</i>(_SC_V6_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set oflibraries to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel with 32-bit <b>int</b> and 64-bit <b>long</b>, <b>pointer</b>, and <b>off_t</b> types.</dd><dt>_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set ofinitial options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using aprogramming 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 atleast 64 bits.</dd><dt>_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS</dt><dd>If <i>sysconf</i>(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set offinal options to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel 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 64bits.</dd><dt>_CS_POSIX_V6_LPBIG_OFFBIG_LIBS</dt><dd>If <i>sysconf</i>(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set oflibraries to be given to the <a href="../utilities/c99.html"><i>c99</i></a> utility to build an application using a programmingmodel 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 64bits.</dd><dt>_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS</dt><dd>This value is a <newline>-separated list of names of programming environments supported by the implementation in which thewidths 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>useconds_t</b>, <b>wchar_t</b>, and <b>wint_t</b> types areno greater than the width of type <b>long</b>.</dd></dl><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">The following symbolic constants are reserved for compatibility with Issue 5:</p><p><br>_CS_XBS5_ILP32_OFF32_CFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFF32_LDFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFF32_LIBS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFF32_LINTFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFFBIG_CFLAGS (<b>LEGACY</b>)<br>_CS_XBS5_ILP32_OFFBIG_LDFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFFBIG_LIBS (<b>LEGACY</b>)<br> _CS_XBS5_ILP32_OFFBIG_LINTFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LP64_OFF64_CFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LP64_OFF64_LDFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LP64_OFF64_LIBS (<b>LEGACY</b>)<br> _CS_XBS5_LP64_OFF64_LINTFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LPBIG_OFFBIG_CFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LPBIG_OFFBIG_LDFLAGS (<b>LEGACY</b>)<br> _CS_XBS5_LPBIG_OFFBIG_LIBS (<b>LEGACY</b>)<br> _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS (<b>LEGACY</b>)<br> <img src="../images/opt-end.gif" alt="[Option End]" border="0"><br></p><p>The following symbolic constants shall be defined for the <a href="../functions/lseek.html"><i>lseek</i>()</a> and <a href="../functions/fcntl.html"><i>fcntl</i>()</a> functions and shall have distinct values:</p><dl compact><dt>SEEK_CUR</dt><dd>Set file offset to current plus <i>offset</i>.</dd><dt>SEEK_END</dt><dd>Set file offset to EOF plus <i>offset</i>.</dd><dt>SEEK_SET</dt><dd>Set file offset to <i>offset</i>.</dd></dl><p>The following symbolic constants shall be defined as possible values for the <i>function</i> argument to the <a href="../functions/lockf.html"><i>lockf</i>()</a> function:</p><dl compact><dt>F_LOCK</dt><dd>Lock a section for exclusive use.</dd><dt>F_TEST</dt><dd>Test section for locks by other processes.</dd><dt>F_TLOCK</dt><dd>Test and lock a section for exclusive use.</dd><dt>F_ULOCK</dt><dd>Unlock locked sections.</dd></dl><p>The following symbolic constants shall be defined for <a href="../functions/pathconf.html"><i>pathconf</i>()</a>:</p><p><br> _PC_ALLOC_SIZE_MIN<br>_PC_ASYNC_IO<br>_PC_CHOWN_RESTRICTED<br>_PC_FILESIZEBITS<br>_PC_LINK_MAX<br>_PC_MAX_CANON<br>_PC_MAX_INPUT<br>_PC_NAME_MAX<br>_PC_NO_TRUNC<br>_PC_PATH_MAX<br>_PC_PIPE_BUF<br>_PC_PRIO_IO<br>_PC_REC_INCR_XFER_SIZE<br>_PC_REC_MIN_XFER_SIZE<br>_PC_REC_XFER_ALIGN<br>_PC_SYMLINK_MAX<br>_PC_SYNC_IO<br>_PC_VDISABLE<br></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -