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
2-1
2 The Development Environment
This section discusses different environments for developing or compiling C and C++
programs to run in the OSS environment. These environments include using
development tools in the HP Enterprise Toolkit-—NonStop Edition (ETK) on a PC and
using development tools directly in the OSS environment. On G-series systems, you
can also use the HP Tandem Development Suite (TDS) for development functions on
the PC, but ETK provides many advantages and is the recommended PC-based
development environment. For more information about using the ETK on a PC, refer to
the ETK online help. For more information on using TDS, refer to the TDS online help
and to the C/C++ Programmer’s Guide.
The following topics are discussed in this section:
•
TNS/R Native, TNS/E Native, and TNS Environments on page 2-1
•
Compilation Options for C and C++ Programs on page 2-3
•
Moving or Accessing Source Files on page 2-6
•
Working on the NonStop System on page 2-10
TNS/R Native, TNS/E Native, and TNS
Environments
HP has moved from its proprietary TNS run-time environment to the standards-
compliant TNS/R and TNS/E native run-time environments. The native environments
support the NonStop operating system and applications, but the TNS/R native
environment is based on reduced instruction-set computing (RISC) technology and the
TNS/E native environment is based on Itanium technology. TNS/R and TNS/E native
processors implement the TNS/R and TNS/E native instruction sets, respectively, and
maintain architectural compatibility with TNS processors.
TNS/R native mode enables you to write programs that take full advantage of the RISC
architecture of TNS/R systems. A program that runs in TNS/R native mode consists
entirely of RISC instructions.
TNS/E native mode enables you to write programs that take full advantage of the
Itanium architecture of TNS/E systems. A program that runs in TNS/E native mode
consists entirely of Itanium instructions.
Native programs do not have TNS architecture-specific attributes. Native programs
have a different process and memory architecture than TNS programs.
Many Guardian software products are written to use the RISC or Itanium technology.
Being familiar with the TNS/R or TNS/E native environment is important for
programmers migrating Guardian source code to the Open System Services (OSS)
environment, and for those porting C or C++ source code from a UNIX system to the
OSS environment. On TNS/R systems, much of the code supplied by HP for software
products for the native environment has been generated using the native C compilers.
On TNS/E systems, virtually all of the code supplied by HP for the native environment
is native code. All OSS programs run as native processes.