Download man pages section 5 - Oracle Documentation

Transcript
standards(5)
To build or compile an application that conforms to one of the X/Open CAE
specifications, use the following guidelines. Applications need not set the POSIX
feature test macros if they require both CAE and POSIX functionality.
Compilation
XPG3
The application must define _XOPEN_SOURCE with a value other
than 500 (preferably 1).
XPG4
The application must define _XOPEN_SOURCE with a value other
than 500 (preferably 1) and set _XOPEN_VERSION=4.
SUS (XPG4v2)
The application must define _XOPEN_SOURCE with a value other
than 500 (preferably 1) and set _XOPEN_SOURCE_EXTENDED=1.
SUSv2
The application must define _XOPEN_SOURCE=500.
A POSIX.2-, XPG4-, SUS-, or SUSv2-conforming implementation must include an
ANSI X3.159-1989 (ANSI C Language) standard-conforming compilation system and
the cc and c89 utilities. Solaris 7 through 9 were tested with the cc and c89 utilities
and the compilation system provided by Sun WorkShop Compiler™ C 5.0 in the
SPARC and x86 environments. When cc is used to link applications,
/usr/ccs/lib/values-xpg4.o must be specified on any link/load command line,
but the preferred way to build applications is described below.
An XNS4- or XNS5-conforming application must include -l XNS on any link/load
command line in addition to defining the feature test macros specified for SUS or
SUSv2, respectively.
If the compiler suppports the redefine_extname pragma feature (the Sun
WorkShop Compiler™ C 4.2 and Sun WorkShop Compiler™ C 5.0 compilers
define the macro __PRAGMA_REDEFINE_EXTNAME to indicate that it supports this
feature), then the standard headers use #pragma redefine_extname directives to
properly map function names onto library entry point names. This mapping provides
full support for ISO C, POSIX, and X/Open namespace reservations. The Sun
WorkShop Compiler™ C 5.0 compiler was used for all branding and certification
tests for Solaris releases 7 through 9.
If this pragma feature is not supported by the compiler, the headers use the #define
directive to map internal function names onto appropriate library entry point names.
In this instance, applications should avoid using the explicit 64-bit file offset symbols
listed on the lf64(5) manual page, since these names are used by the implementation
to name the alternative entry points.
When using Sun WorkShop Compiler™ C 5.0, applications conforming to the
specifications listed above should be compiled using the utilities and flags indicated in
the following table:
Specification
ANSI/ISO C
Compiler/Flags
c89
Feature Test Macros
none
Standards, Environments, and Macros
331