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-10
Working on the NonStop System
•
To extract only the C source files from an archive file stored on the magnetic tape:
$ pax -r -f /G/tape *.c
In this example, existing files will be not be overwritten. To overwrite existing files,
include the -Wclobber flag on the pax command.
•
The pax utility can also take its input from the standard input file and write to an
archive file. The following example uses the find command to find all C source
files in the current directory:
$ find . -name "*.c" -print | pax -w -f files.pax
For more information about the pax utility, refer to the pax(1) reference page either
online or in the Open System Services Shell and Utilities Reference Manual.
Working on the NonStop System
Here is a brief overview of the tools you can use when porting or developing programs
on the NonStop system. The topics covered include:
•
C and C++ Compilation Using the c89 Utility on page 2-10
•
Editing OSS Files on page 2-17
•
Using the Debuggers With OSS Files on page 2-18
•
Using the noft and enoft Utilities on Native Program Files on page 2-21
C and C++ Compilation Using the c89 Utility
From the OSS environment, there are three versions of the OSS c89 utility, the driver
program for the C and C++ compilation tools:
•
A native c89 driver for the G-series and H-series TNS/R native C and C++
compilation tools
•
A native c89 driver for the H-series TNS/E native C and C++ compilation tools
•
A TNS c89 driver for the G-series TNS C and C++ compilation tools
This subsection describes the c89 drivers and how to use them. The native c89 utility
is the default utility on both the G-series and H-series systems
From the OSS environment, the c89 utility invokes the same compilation tools as used
to compile C or C++ programs for the Guardian environment. Thus, the TNS/R and
TNS/E native c89 utilities have all the compilation capabilities whether running in the
OSS or Guardian environment, and the TNS c89 utility has all the compilation
capabilities whether running in the Guardian or G-series OSS environment.
The files in the c89 operand list are processed by the compilation system, depending
on the c89 command line flags and the type of file operands you specify. c89 comes
with all of the header files and the run-time libraries, enabling you to compile programs
compliant with ISO/ANSI C for either the OSS or Guardian environment. By default, if