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
The Development Environment
Open System Services Porting Guide—520573-006
2-4
Compilation Options for C and C++ Programs
TNS/R native object files to a TNS/R system for execution. The TNS/E native
compilation tools are supported only on TNS/E systems.
Cross-compilation is supported for the TNS/R and TNS/E native development tools,
allowing you to compile your C or C++ source code in one development environment
(Guardian or OSS on a NonStop system or ETK on a PC).
As mentioned earlier, you may decide to develop, compile, and debug your C and C++
code on your PC. Then, if you followed the ISO/ANSI C standards discussed in Porting
Is Easier When Standards Are Used on page 1-2, transferring code to the OSS
environment and executing it there should be relatively easy.
Working on a PC or on a NonStop system, you have many options for developing your
C and C++ application programs:
1. Compile your C or C++ code with the ETK on your PC. Then transfer your files to
the OSS environment on the NonStop system to run in a native environment.
2. Develop, compile, and debug C or C++ code in the OSS environment with the
TNS/R native C compilation tools on a G-series system as discussed in the Open
System Services Programmer’s Guide and the C/C++ Programmer’s Guide.
3. Develop, compile, and debug C or C++ code in the OSS environment with the
TNS/E native C compilation tools on an H-series system as discussed in the Open
System Services Programmer’s Guide and the C/C++ Programmer’s Guide.
4. Develop and compile (but not debug) C or C++ code in the OSS environment with
the TNS/R native C compilation tools on an H-series system as discussed in the
Open System Services Programmer’s Guide and the C/C++ Programmer’s Guide.
5. Develop, compile, and debug C or C++ code in the G-series OSS environment with
the TNS C compilation tools as discussed in the Open System Services
Programmer’s Guide and the C/C++ Programmer’s Guide.
6. Develop, compile, and debug C or C++ code in the Guardian environment with the
native C compilation tools on either a G-series or H-series system as discussed in
the Guardian Programmer’s Guide and C/C++ Programmer’s Guide.
7. Develop, compile, and debug C or C++ code in the Guardian environment on a
G-series system with the TNS C compilation tools as discussed in the Guardian
Programmer’s Guide and C/C++ Programmer’s Guide.
8. Develop, compile, and debug C or C++ code in the Guardian environment on an
H-series system with the TNS C compilation tools as discussed in the Guardian
Programmer’s Guide and C/C++ Programmer’s Guide.
For compilation Option 2 through Option 7, you can also cross-compile for the opposite
environment; that is, generate a Guardian executable file from the OSS environment
and vice versa. For compilation option 8, you cannot cross-compile for the opposite
environment because the H-series OSS environment does not support TNS
compilation and execution. Table 2-1 presents the cross-compile options available with
PC compilers and HP compilers generating executable files for the OSS and Guardian