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

Table Of Contents
Interoperating Between Programming Environments
Open System Services Porting Guide520573-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(),