📄 xbd_chap01.html
字号:
<h4><a name="tag_01_01_03"></a>Normative References</h4><p>There is no additional rationale provided for this section.</p><h4><a name="tag_01_01_04"></a>Terminology</h4><p>The meanings specified in IEEE Std 1003.1-2001 for the words <i>shall</i>, <i>should</i>, and <i>may</i> are mandatedby ISO/IEC directives.</p><p>In the Rationale (Informative) volume of IEEE Std 1003.1-2001, the words <i>shall</i>, <i>should</i>, and <i>may</i>are sometimes used to illustrate similar usages in IEEE Std 1003.1-2001. However, the rationale itself does not specifyanything regarding implementations or applications.</p><h4><a name="tag_01_01_05"></a>conformance document</h4><p>As a practical matter, the conformance document is effectively part of the system documentation. Conformance documents aredistinguished by IEEE Std 1003.1-2001 so that they can be referred to distinctly.</p><h4><a name="tag_01_01_06"></a>implementation-defined</h4><p>This definition is analogous to that of the ISO C standard and, together with "undefined" and "unspecified", provides arange of specification of freedom allowed to the interface implementor.</p><h4><a name="tag_01_01_07"></a>may</h4><p>The use of <i>may</i> has been limited as much as possible, due both to confusion stemming from its ordinary English meaning andto objections regarding the desirability of having as few options as possible and those as clearly specified as possible.</p><p>The usage of <i>can</i> and <i>may</i> were selected to contrast optional application behavior (can) against optionalimplementation behavior (may).</p><h4><a name="tag_01_01_08"></a>shall</h4><p>Declarative sentences are sometimes used in IEEE Std 1003.1-2001 as if they included the word <i>shall</i>, andfacilities thus specified are no less required. For example, the two statements:</p><ol><li><p>The <i>foo</i>() function shall return zero.</p></li><li><p>The <i>foo</i>() function returns zero.</p></li></ol><p>are meant to be exactly equivalent.</p><h4><a name="tag_01_01_09"></a>should</h4><p>In IEEE Std 1003.1-2001, the word <i>should</i> does not usually apply to the implementation, but rather to theapplication. Thus, the important words regarding implementations are <i>shall</i>, which indicates requirements, and <i>may</i>,which indicates options.</p><h4><a name="tag_01_01_10"></a>obsolescent</h4><p>The term "obsolescent" means "do not use this feature in new applications". The obsolescence concept is not an idealsolution, but was used as a method of increasing consensus: many more objections would be heard from the user community if some ofthese historical features were suddenly withdrawn without the grace period obsolescence implies. The phrase "may be considered forwithdrawal in future revisions" implies that the result of that consideration might in fact keep those features indefinitely ifthe predominance of applications do not migrate away from them quickly.</p><h4><a name="tag_01_01_11"></a>legacy</h4><p>The term "legacy" was added for compatibility with the Single UNIX Specification. It means "this feature is historic andoptional; do not use this feature in new applications. There are alternative interfaces that are more suitable.". It is usedexclusively for XSI extensions, and includes facilities that were mandatory in previous versions of the base document but areoptional in this revision. This is a way to "sunset" the usage of certain functions. Application writers should not rely on theexistence of these facilities in new applications, but should follow the migration path detailed in the APPLICATION USAGE sectionsof the relevant pages.</p><p>The terms "legacy" and "obsolescent" are different: a feature marked LEGACY is not recommended for new work and need not bepresent on an implementation (if the XSI Legacy Option Group is not supported). A feature noted as obsolescent is supported by allimplementations, but may be removed in a future revision; new applications should not use these features.</p><h4><a name="tag_01_01_12"></a>system documentation</h4><p>The system documentation should normally describe the whole of the implementation, including any extensions provided by theimplementation. Such documents normally contain information at least as detailed as the specifications inIEEE Std 1003.1-2001. Few requirements are made on the system documentation, but the term is needed to avoid a danglingpointer where the conformance document is permitted to point to the system documentation.</p><h4><a name="tag_01_01_13"></a>undefined</h4><p>See <i>implementation-defined</i>.</p><h4><a name="tag_01_01_14"></a>unspecified</h4><p>See <i>implementation-defined</i>.</p><p>The definitions for "unspecified" and "undefined" appear nearly identical at first examination, but are not. The term"unspecified" means that a conforming application may deal with the unspecified behavior, and it should not care what the outcomeis. The term "undefined" says that a conforming application should not do it because no definition is provided for what it does(and implicitly it would care what the outcome was if it tried it). It is important to remember, however, that if the syntaxpermits the statement at all, it must have some outcome in a real implementation.</p><p>Thus, the terms "undefined" and "unspecified" apply to the way the application should think about the feature. In terms ofthe implementation, it is always "defined''-there is always some result, even if it is an error. The implementation is free tochoose the behavior it prefers.</p><p>This also implies that an implementation, or another standard, could specify or define the result in a useful fashion. The termsapply to IEEE Std 1003.1-2001 specifically.</p><p>The term "implementation-defined" implies requirements for documentation that are not required for "undefined" (or"unspecified"). Where there is no need for a conforming program to know the definition, the term "undefined" is used, eventhough "implementation-defined" could also have been used in this context. There could be a fourth term, specifying "thisstandard does not say what this does; it is acceptable to define it in an implementation, but it does not need to be documented",and undefined would then be used very rarely for the few things for which any definition is not useful. In particular,implementation-defined is used where it is believed that certain classes of application will need to know such details to determinewhether the application can be successfully ported to the implementation. Such applications are not always strictly portable, butnevertheless are common and useful; often the requirements met by the application cannot be met without dealing with the issuesimplied by "implementation-defined".</p><p>In many places IEEE Std 1003.1-2001 is silent about the behavior of some possible construct. For example, a variablemay be defined for a specified range of values and behaviors are described for those values; nothing is said about what happens ifthe variable has any other value. That kind of silence can imply an error in the standard, but it may also imply that the standardwas intentionally silent and that any behavior is permitted. There is a natural tendency to infer that if the standard is silent, abehavior is prohibited. That is not the intent. Silence is intended to be equivalent to the term "unspecified".</p><p>The term "application" is not defined in IEEE Std 1003.1-2001; it is assumed to be a part of general computerscience terminology.</p><p>Three terms used within IEEE Std 1003.1-2001 overlap in meaning: "macro", "symbolic name", and "symbolicconstant".</p><h4><a name="tag_01_01_15"></a>macro</h4><p>This usually describes a C preprocessor symbol, the result of the <b>#define</b> operator, with or without an argument. It mayalso be used to describe similar mechanisms in editors and text processors.</p><h4><a name="tag_01_01_16"></a>symbolic name</h4><p>This can also refer to a C preprocessor symbol (without arguments), but is also used to refer to the names for characters incharacter sets. In addition, it is sometimes used to refer to host names and even filenames.</p><h4><a name="tag_01_01_17"></a>symbolic constant</h4><p>This also refers to a C preprocessor symbol (also without arguments).</p><p>In most cases, the difference in semantic content is negligible to nonexistent. Readers should not attempt to read any meaninginto the various usages of these terms.</p><h4><a name="tag_01_01_18"></a>Portability</h4><p>To aid the identification of options within IEEE Std 1003.1-2001, a notation consisting of margin codes and shading isused. This is based on the notation used in previous revisions of The Open Group's Base specifications.</p><p>The benefit of this approach is a reduction in the number of <i>if</i> statements within the running text, that makes the texteasier to read, and also an identification to the programmer that they need to ensure that their target platforms support theunderlying options. For example, if functionality is marked with THR in the margin, it will be available on all systems supportingthe Threads option, but may not be available on some others.</p><h5><a name="tag_01_01_18_01"></a>Codes</h5><p>This section includes codes for options defined in the Base Definitions volume of IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap02.html#tag_02_01_06">Section 2.1.6, Options</a>, and the following additional codes for other purposes:</p><dl compact><dt>CX</dt><dd>This margin code is used to denote extensions beyond the ISO C standard. For interfaces that are duplicated betweenIEEE Std 1003.1-2001 and the ISO C standard, a CX introduction block describes the nature of the duplication, withany extensions appropriately CX marked and shaded. <p>Where an interface is added to an ISO C standard header, within the header the interface has an appropriate margin markerand shading (for example, CX, XSI, TSF, and so on) and the same marking appears on the reference page in the SYNOPSIS section. Thisenables a programmer to easily identify that the interface is extending an ISO C standard header.</p></dd><dt>MX</dt><dd>This margin code is used to denote IEC 60559:1989 standard floating-point extensions.</dd><dt>OB</dt><dd>This margin code is used to denote obsolescent behavior and thus flag a possible future applications portability warning.</dd><dt>OH</dt><dd>The Single UNIX Specification has historically tried to reduce the number of headers an application has had to include whenusing a particular interface. Sometimes this was fewer than the base standard, and hence a notation is used to flag which headersare optional if you are using a system supporting the XSI extension.</dd><dt>XSI</dt><dd>This code is used to denote interfaces and facilities within interfaces only required on systems supporting the XSI extension.This is introduced to support the Single UNIX Specification.</dd><dt>XSR</dt><dd>This code is used to denote interfaces and facilities within interfaces only required on systems supporting STREAMS. This isintroduced to support the Single UNIX Specification, although it is defined in a way so that it can stand alone from the XSInotation.</dd></dl><h5><a name="tag_01_01_18_02"></a>Margin Code Notation</h5><p>Since some features may depend on one or more options, or require more than one option, a notation is used. Where a featurerequires support of a single option, a single margin code will occur in the margin. If it depends on two options and both arerequired, then the codes will appear with a <space> separator. If either of two options are required, then a logical OR isdenoted using the <tt>'|'</tt> symbol. If more than two codes are used, a special notation is used.</p><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX ® is a registered Trademark of The Open Group.<br>POSIX ® is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -