Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide—520573-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