Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
The Development Environment
Open System Services Porting Guide520573-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