Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide520573-006
7-4
Equivalent Features
trade-offs associated with process-creation and other major functions are discussed in
Section 6, OSS Porting Considerations.
Equivalent Features
Some features found in UNIX environments are not provided in the OSS programming
environment, are implemented differently, or are provided with slightly different
functions. These features include:
Memory mapped files
Memory allocation
Multithreading
Semaphores
STREAMS
TLI/XTI
If your program uses these features, some changes might be required in the source
code to use the equivalent features provided in the OSS environment. See Section 6,
OSS Porting Considerations, for a discussion on each of these features.
Standard Functions
To maximize portability, standard functions should be used wherever possible. If your
application program is limited to using standard functions defined in the ISO/ANSI C,
POSIX.1 and POSIX.2 standards, and the XPG4 system interface specifications, it
should have a wide scope of portability. See Porting Is Easier When Standards Are
Used on page 1-2.
Equivalent Functions
If the program being ported to the OSS environment uses nonstandard functions, these
should be modified to use the equivalent standard functions. If an equivalent standard
function is unavailable, the function might need to be rewritten in standard ISO/ANSI C,
or the logic of the program might need to be rewritten to use a standard function, one
close to the original functionality. This requirement is particularly true for old Berkeley
Software Development (BSD) and System V Release 4 UNIX (SVR4) programs that
use nonstandard functions. See Using Functional Equivalents on page 7-6 for further
details.
Single-Processor Versus Multiprocessor Systems
Most UNIX programs today are written to run on a single-processor architecture. When
porting to the OSS environment, a program should first be ported to a single-processor
environment. This strategy should simplify the porting effort without requiring major
design changes to the program; all of the guidelines discussed earlier should be
followed for this port.
After the program is ported to a single-processor configuration in the OSS
environment, you can make design changes to enhance the performance of the