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

Table Of Contents
The Development Environment
Open System Services Porting Guide520573-006
2-12
C and C++ Compilation Using the c89 Utility
utility. The H-series TNS C and C++ compilation tools run in the Guardian environment
only.
The TNS C and C++ compilation tools are not supported on PCs or in the H-series
OSS environment. The code files and reference pages for the TNS C and C++ tools
are located in the OSS /nonnative directory.
Depending on the flags and input file operands you include on the c89 command line,
the TNS C compiler can perform the following operations:
1. Compile any source C and C++ files into object files
2. Bind object files with any libraries specified on the command line into a single
program file (unless the -c or -Wnobind flag is specified)
3. If the program is going to run in a TNS/R native environment, use the Accelerator
program to optimize performance
4. If the program is going to run in an H-series Guardian environment, use the Object
Code Accelerator program to optimize performance
5. If the program contains embedded SQL statements, use an SQL compiler as the
final step
TNS/R Native c89 Flags and TNS c89 Flags
The c89 flags support compiling, linking, and optimizing and are used for setting
compiler pragmas. The native c89 utility supports more flags and pragmas than does
the TNS c89 utility. In some cases, flags for a compilation options have a different
name between the native c89 and TNS c89 utilities. If you are familiar with the TNS
c89 flags and wish to use the native c89 utility, refer to the TNS/R Native Application
Migration Guide for c89 flag mapping information.
For a detailed description for each c89 flag, refer to the c89(1) reference pages. The
TNS/R and TNS/E c89(1) reference pages are available either online or in the Open
System Services Shell and Utilities Reference Manual; the TNS c89(1) reference
page is available online in the /nonnative/usr/share/man set of reference pages.
Displaying c89 Help
To display help information for running c89, you can enter a c89 help flag on the
native c89 command line. No compilation system components are run with -Whelp or
-Wusage. Additionally, you can refer to the appropriate copy of the c89(1) online
reference page. The TNS/R and TNS/E c89(1) reference pages are available either
online or in the Open System Services Shell and Utilities Reference Manual; the TNS
c89(1) reference page is available online in the /nonnative/usr/share/man set
of reference pages.