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

📄 namespace.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>The Name Space (XNS)</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><blockquote><center><h3><a name = "tag_000_002">&nbsp;</a>The Name Space (XNS)</h3></center><xref type="3" name="names"></xref><index term="name space, X/Open"></index><index term="X/Open name space, "></index>When _XOPEN_SOURCE is defined, each header defines or declares someidentifiers, potentially conflicting with identifiers used by theapplication.  The set of identifiers visible to the application consists ofprecisely those identifiers from the header pages of the included headers, aswell as additional identifiers reserved for the implementation.  In addition,some headers may make visible identifiers from other headers as indicated onthe relevant header pages.<p>The identifiers reserved for use by the implementation aredescribed below.<ol><p><li>Each identifier with external linkage described in the header sectionis reserved for use as an identifier with external linkage if theheader is included.<p><li>Each macro name described in the header section is reserved forany use if the header is included.<p><li>Each identifier with file scope described in the header section isreserved for use as an identifier with file scope in the samename space if the header is included.<p></ol><p>If any header in the following table is included, identifiers with thefollowing prefixes or suffixes shown are reserved for any use by theimplementation.<p><center><p><table  bordercolor=#000000 border=1 cellpadding=3 align=center><tr valign=top><th align=left><b>Header</b><th align=left><b>Prefix</b><th align=left><b>Suffix</b><tr valign=top><td align=left><b>&lt;arpa/inet.h&gt;</b><td align=left>in_, inet_<td align=left>&nbsp;<tr valign=top><td align=left><b>&lt;netdb.h&gt;</b><td align=left>h_, n_, p_, s_<td align=left>&nbsp;<tr valign=top><td align=left><b>&lt;netinet/in.h&gt;</b><td align=left>in_, ip_, s_, sin_<td align=left>&nbsp;<tr valign=top><td align=left><b>&lt;sys/socket.h&gt;</b><td align=left>sa_, if_, ifc_, ifru_, infu_, ifra_, msg_, cmsg_, l_<td align=left>&nbsp;<tr valign=top><td align=left><b>&lt;sys/un.h&gt;</b><td align=left>sun_<td align=left>&nbsp;<tr valign=top><td align=left><b>&lt;xti.h&gt;</b><td align=left>l_, t_, T_<td align=left>&nbsp;<tr valign=top><td align=left><b>ANY header</b><td align=left>&nbsp;<td align=left>_t</table></center><p>If any header in the following table is included, macros with the prefixesshown may be defined.  After the last inclusion of a given header, anapplication may use identifiers with the corresponding prefixes for its ownpurpose, provided their use is preceded by an<b>#undef</b>of the corresponding macro.<p><center><p><table  bordercolor=#000000 border=1 cellpadding=3 align=center><tr valign=top><th align=left><b>Header</b><th align=left><b>Prefix</b><tr valign=top><td align=left><b>&lt;netinet/in.h&gt;</b><td align=left>IMPLINK_, IN_, INADDR_, IP_, IPPORT_, IPPROTO_, SOCK_<tr valign=top><td align=left><b>&lt;sys/socket.h&gt;</b><td align=left>AF_, CMSG_, MSG_, PF_, SCM_, SHUT_, SO<tr valign=top><td align=left><b>&lt;xti.h&gt;</b><td align=left>OPT_, T_, XTI_</table></center><p>The following identifiers are reserved regardless of the inclusion of headers:<ol><p><li>All identifiers that begin with an underscore and either anupper-case letter or another underscore are always reserved forany use by the implementation.<p><li>All identifiers that begin with an underscore are always reservedfor use as identifiers with file scope in both the ordinaryidentifier and tag name spaces.<br><p><li>All identifiers in the table below are reserved for use asidentifiers with external linkage.<p><center><p><table  bordercolor=#000000 border=1 cellpadding=3 align=center><tr valign=top><th colspan=5 align=left><b>XTI:</b><tr valign=top><td align=left> t_accept t_alloc t_bind t_close t_connect t_errno t_error t_free <td align=left> &nbsp; t_getinfo t_getprotaddr t_getstate t_listen t_look t_open t_optmgmt <td align=left> &nbsp; t_rcv t_rcvconnect t_rcvdis t_rcvrel t_rcvreldata t_rcvudata t_rcvuderr <td align=left> &nbsp; t_rcvv t_rcvvudata t_snd t_snd t_snddis t_sndrel t_sndreldata <td align=left> &nbsp; t_sndudata t_sndv t_sndvudata t_strerror t_sync t_sysconf t_unbind <tr valign=top><td colspan=5 align=left><b>Sockets:</b><tr valign=top><td align=left> accept bind connect getpeername <td align=left> &nbsp; getsockname getsockopt listen recv <td align=left> &nbsp; recvfrom recvmsg send <td align=left> &nbsp; sendmsg sendto setsockopt <td align=left> &nbsp; shutdown socket socketpair <tr valign=top><td colspan=5 align=left><b>IP Address Resolution:</b><tr valign=top><td align=left> endhostent endnetent endprotoent endservent gethostbyaddr gethostbyname gethostent <td align=left> gethostname getnetbyaddr getnetbyname getnetent getprotobyname getprotobynumber getprotoent <td align=left> getservbyname getservbyport getservent h_errno htonl htons <td align=left> inet_addr inet_lnaof inet_makeaddr inet_netof inet_network inet_ntoa <td align=left> ntohl ntohs sethostent setnetent setprotoent setservent </table></center><p></ol><p>All the identifiers defined in this document that have external linkage arealways reserved for use as identifiers with external linkage.<p>No other identifiers are reserved.<p>Applications must not declare or define identifiers with the same name as anidentifier reserved in the same context. Since macro names are replacedwhenever found, independent of scope and name space, macro names matching anyof the reserved identifier names must not be defined if any associated headeris included.<p>Headers may be included in any order, and each may be included more than oncein a given scope, with no difference in effect from that of being includedonly once.<p>If used, a header must be included outside of any external declarationor definition, and it must be first included before the first referenceto any type or macro it defines, or to any function or object it declares.However, if an identifier is declared or definedin more than one header, the second and subsequent associated headersmay be included after the initial reference to the identifier.Prior to the inclusion of a header,the program must not define any macros with names lexically identicalto symbols defined by that header.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + -