📄 compilation.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>The Compilation Environment (XNS)</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><blockquote><center><h3><a name = "tag_000_002"> </a>The Compilation Environment (XNS)</h3></center>Applications should ensure that the feature test macro _XOPEN_SOURCEis defined with the value 500 before inclusion of any header.This is needed to enable thefunctionality described in this document,and possibly to enable functionality defined elsewhere in the CommonApplications Environment.<p>The _XOPEN_SOURCE macro may be defined automatically by thecompilation process, but to ensure maximum portability, applicationsshould make sure that _XOPEN_SOURCE is defined by using eithercompiler options or<b>#define</b>directives in the source files, before any<b>#include</b>directives. Identifiers in this document may be undefined using the<b>#undef</b>directive as described in<a href="namespace.html">The Name Space</a>.These<b>#undef</b>directives must follow all<b>#include</b>directives of any XSI headers.<p>Since this specification is aligned with the ISO C standard,and since all functionality enabled by _POSIX_C_SOURCE set greater than zero and less than or equal to 199506Lshould be enabled by _XOPEN_SOURCE set equal to 500,there should be no need todefine either _POSIX_SOURCE or _POSIX_C_SOURCE if _XOPEN_SOURCE isdefined. Therefore if _XOPEN_SOURCE is set equal to 500 and _POSIX_SOURCE isdefined, or _POSIX_C_SOURCE is set greater than zero and less thanor equal to 199506L, the behavior is thesame as if only _XOPEN_SOURCE is defined and set equal to 500.However, should _POSIX_C_SOURCE be set to a value greater than 199506L,the behaviour is undefined.<p>The<i><a href="../xcu/c89.html">c89</a></i>and<i><a href="../xcu/cc.html">cc</a></i>utilities recognise the additional<b>-l</b>operand for standard libraries:<dl compact><dt><b>-l xnet</b><dd>If the implementation defines _XOPEN_UNIX, this operand makes visibleall functions referenced in this document. An implementation may search thislibrary in the absence of this operand.</dl><p>It is unspecified whether the library<b>libxnet.a</b>exists as a regular file.<p>If the implementation supports the utilities marked<b>DEVELOPMENT</b>in the <b>XCU</b> specification, the<i><a href="../xcu/lint.html">lint</a></i>utility recognises the additional<b>-l</b>operand for standard libraries:<dl compact><dt><b>-l xnet</b><dd>Names the library<b>llib-lxnet.ln</b>,which will contain functions specified in this document.</dl><p>It is unspecified whether the library<b>llib-lxnet.ln</b>exists as a regular file.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -