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
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide—520573-006
8-2
TNS to TNS/R or TNS/E Native Migration
completely migrate the application from the Guardian environment to the OSS
environment. If the program makes use of features which are not available from the
OSS environment, this may not be possible, and you may decide that a more realistic
approach is to add open features to the existing Guardian application.
In deciding the degree of migration, you must consider the general issues discussed in
the following subsections:
•
TNS to TNS/R or TNS/E Native Migration on page 8-2
•
Migration Options on page 8-3
•
Converting TAL or pTAL Code to C or C++ on page 8-3
•
Using New and Extended Guardian Procedures in Guardian Programs on page 8-3
•
Using OSS Functions in a Guardian Program on page 8-4
•
Communicating With OSS Programs on page 8-4
•
Migrating a Guardian Program to the OSS Environment on page 8-4
TNS to TNS/R or TNS/E Native Migration
If you are porting an existing Guardian application that was written for a TNS
environment and now wish it to run in a TNS/R or TNS/E native environment, there are
a few considerations that you must account for when migrating a Guardian application
from a TNS to a native environment. It is recommended that when migrating your
Guardian application programs to execute in a native environment, first make the
necessary native migration steps outlined in Section 10, Native Migration Overview,
then add the OSS function routines you wish to use. The migration steps and
considerations listed in Section 10, Native Migration Overview, should be used as a
quick reference to the features for the native environment. For a detailed discussion of
migrating C or C++ programs written for a TNS environment to a TNS/R native
environment, refer to the TNS/R Native Application Migration Guide.
To migrate from a G-series TNS environment to a TNS/E native environment, it is
recommended that you first migrate to the TNS/R native environment, then migrate to
the TNS/E native environment. Most TNS/R native programs will require no source
code changes to run in a TNS/E native environment; but you must recompile the
program using a TNS/E native compiler to create a TNS/E native object file. For
information on migrating from a TNS/R native environment to a TNS/E native
environment, refer to the H-Series Application Migration Guide.
To migrate from an H-series TNS environment to a TNS/E native environment, first
make the source code changes described in the TNS/E Native Application Conversion
Guide. Then recompile the program using a TNS/E native compiler.
For G-series TNS environments, the Guardian C run-time library is different from the
OSS C run-time library. For native environments, the Guardian C run-time and the
OSS C run-time library share the same source code, and OSS and Guardian programs
share the same shared run-time library (on TNS/R systems) or dynamic-link library (on
TNS/E systems).