Applications should ensure that the feature test macro _XOPEN_SOURCE is defined with the value 500 before inclusion of any header. This is needed to enable the functionality described in this document, and possibly to enable functionality defined elsewhere in the Common Applications Environment.
The Compilation Environment (XNS)
The _XOPEN_SOURCE macro may be defined automatically by the compilation process, but to ensure maximum portability, applications should make sure that _XOPEN_SOURCE is defined by using either compiler options or #define directives in the source files, before any #include directives. Identifiers in this document may be undefined using the #undef directive as described in The Name Space. These #undef directives must follow all #include directives of any XSI headers.
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 199506L should be enabled by _XOPEN_SOURCE set equal to 500, there should be no need to define either _POSIX_SOURCE or _POSIX_C_SOURCE if _XOPEN_SOURCE is defined. Therefore if _XOPEN_SOURCE is set equal to 500 and _POSIX_SOURCE is defined, or _POSIX_C_SOURCE is set greater than zero and less than or equal to 199506L, the behavior is the same 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.
The c89 and cc utilities recognise the additional -l operand for standard libraries:
- -l xnet
- If the implementation defines _XOPEN_UNIX, this operand makes visible all functions referenced in this document. An implementation may search this library in the absence of this operand.
It is unspecified whether the library libxnet.a exists as a regular file.
If the implementation supports the utilities marked DEVELOPMENT in the XCU specification, the lint utility recognises the additional -l operand for standard libraries:
- -l xnet
- Names the library llib-lxnet.ln, which will contain functions specified in this document.
It is unspecified whether the library llib-lxnet.ln exists as a regular file.