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
Interoperating Between Programming Environments
Open System Services Porting Guide—520573-006
5-5
API Interoperability Tables
An application program interface (API) is a set of functions or procedure declarations
that permits user programs to communicate with the operating system or subsystem.
The OSS API coexists on NonStop systems with the Guardian API.
Some functions and macros in the Guardian and OSS APIs can “interoperate”
completely between the Guardian and OSS environments: that is, they can be called
from either a Guardian or OSS module, can execute as part of a Guardian or OSS
process, and can operate on Guardian or OSS objects. Some functions and macros
are more limited in their interoperability.
An OSS module is a module compiled to execute in the OSS environment. Likewise, a
Guardian module is a module compiled to execute in the Guardian environment.
Normally, the environments of a module and of the process containing the module are
the same; however, an OSS process can contain both OSS and Guardian modules,
and a Guardian process can contain both Guardian and OSS modules, as discussed
later in Mixed-Module Programming on page 5-13.
API Interoperability Tables
The API interoperability tables appear in the Open System Services Programmer’s
Guide. These tables describe the interoperability between the Guardian API and the
OSS API. There is one API interoperability table for TNS/R and TNS/E native
processes and one for G-series TNS processes. (The H-series OSS environment does
not support TNS processes.)
For each function or macro listed in an API interoperability table, the level of
interoperability it provides is indicated by the following information:
•
Whether the function or macro is part of the Guardian API, OSS API, or both.
•
Where the function or macro is defined.
•
Whether the function or macro can be called from a Guardian module, an OSS
module, a Guardian process, or an OSS process.
•
Types of parameters (OSS or Guardian) the function or macro requires.
•
Type of objects (OSS or Guardian) on which the function or macro operates.
Because a function can be called from both Guardian and OSS processes or Guardian
and OSS modules does not mean that the function behaves the same in each
environment. Function behavior can be identical, nearly identical, or different. Refer to
the API interoperability tables for details of these behavioral differences.
Environment-Specific Functions
The use of a common shared run-time library or dynamic-link library between OSS and
Guardian TNS/R and TNS/E native programs promotes greater interoperability
between the two environments. However, for input and output, those functions that
handle Guardian filenames or OSS pathnames remain environment-specific. The
functions that require environment-specific parameters include fopen(), freopen(),