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-2
TNS/R Development Tools on TNS/E Systems
HP provides a complete set of C and C++ compilation tools with each native
environment. The TNS/R native compilers generate RISC code, which can run only on
a TNS/R system. The TNS/E native compilers generate Itanium code, which can run
only on a TNS/E system.
The TNS/R and TNS/E native C compilers and the TNS C compiler implement the
ISO/ANSI C, POSIX.1, and POSIX.2 standards and the XPG4 specifications for the C
language, plus extensions defined by HP. However, on H-series systems, the TNS C
compiler is supported only in the Guardian environment; the H-series OSS
environment does not provide a TNS C compiler and does not support execution of
TNS processes. The TNS/R and TNS/E native C compilers also accept programs
written in Common C. These C compilers implement the proposed ANSI standard for
the C++ language and the C++ extensions defined by HP. Using these C compilers is
discussed in Section 2, The Development Environment.
If you wish to migrate your TNS C or C++ source code to TNS/R native mode, refer to
the TNS/R Native Application Migration Guide for issues related to migrating the code
to TNS/R native mode. To migrate a TNS program to TNS/E native mode, you can first
convert it to TNS/R native mode, then migrate the TNS/R native program to the TNS/E
native environment. Refer to the H-Series Application Migration Guide for information
on migrating a TNS/R native program to the TNS/E native environment. See also
Section 10, Native Migration Overview, which provides considerations for migrating to
the TNS/R and TNS/E native environments.
TNS/R Development Tools on TNS/E Systems
In addition to the TNS/E native development tools, TNS/E systems also support the
TNS/R native development tools. You can compile and link TNS/R native programs to
create TNS/R executable object files on a TNS/E system, but you cannot run those
files on the TNS/E system; you must move them to a TNS/R system for execution. This
capability enables you to do some of your TNS/R development work on a TNS/E
system while reserving your TNS/R systems for production use. The following TNS/R
tools are available on TNS/E systems:
•
C and C++ compilers (c89 -Wtarget=TNS/R)
•
non-position independent code linker (nld)
•
PIC linker (ld)
•
native object file utility (noft)
System Compatibility
All versions of the TNS/R and TNS/E native C compilers (Guardian version, OSS
version, and the HP Enterprise Toolkit—NonStop Edition, or ETK, version on a PC)
generate the same object code from the same source. You can develop code on an
NonStop system in the OSS or Guardian environment, or using ETK on a PC.