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
Open System Services Porting Guide—520573-006
8-1
8
Migrating Guardian Applications to
the OSS Environment
Guardian programs for NonStop systems have been written in a number of
programming languages, including TAL, C, C++, and COBOL85. You can make
programs more open by using OSS features in the Guardian environment, or even
migrate the programs to run in the OSS environment.
There are basically two ways to migrate an existing Guardian TNS program:
•
Migrate the Guardian TNS program to the Guardian native environment.
•
Migrate the Guardian TNS program to the OSS native environment.
Programs compiled with a native C compiler and targeted for the native environments,
OSS or Guardian, provide performance improvements over the TNS environment.
Thus it is highly recommended that you port your C or C++ programs to the native
environment, rather than making changes for the TNS environment. Note also that on
H-series systems, OSS does not support the TNS environment. Therefore, when
migrating a Guardian TNS program to OSS on an H-series system, you must migrate
the program to the TNS/E native environment.
This section addresses programmers who wish to migrate their Guardian TNS
programs developed for the TNS environment to the Guardian or OSS native
environment.
The topics for this section are:
•
General Migration Guidelines on page 8-1
•
C Compiler Issues for Guardian Programs on page 8-4
•
Using New and Extended Guardian Procedures on page 8-10
•
Using OSS Functions in a Guardian Program on page 8-14
•
Interoperating With OSS Programs on page 8-17
•
Starting an OSS Program From the Guardian Environment on page 8-20
•
C Compiler Considerations for OSS Programs on page 8-24
•
Porting a Guardian Program to the OSS Environment on page 8-28
This section can be used by Guardian environment C or C++ programmers interested
in either adding more open features to their Guardian C programs, migrating their C
programs from the Guardian environment to the OSS environment, or simply
interoperating with OSS programs. Programmers are provided with a general set of
guidelines to follow in determining the degree of migration that should be attempted,
and the issues which must be considered to perform the migration.
General Migration Guidelines
There are a number of issues that you must consider when migrating a Guardian
application to have better access to open features. In some cases, you may want to