Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

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 or J-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 or c99 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.
To display help information for running the c99 utility, you can enter a c99 help flag on the c99
command line. No compilation system components are run with the -Whelp or -Wusage flags.
Additionally, you can refer to the c99(1) reference page either online or in the Open System
Services Shell and Utilities Reference Manual.
Differences in Handling Input Files
When compiling source code with the G-series TNS C compiler, the compiler assumes the filename
starting with /G/ is a Guardian file and reads its contents to determine its type instead of checking
for a suffix. The TNS/R and TNS/E native C compilers do not read any file in this manner; they
require a suffix for the input file. The G-series TNS C compiler accepts filenames with and without
the dot (.) suffix; the native C compilers reject such names. Refer to the c89(1) or c99(1)reference
page for acceptable suffixes for input files.
For example, when specifying a C++ source for the G-series TNS C compiler, you can specify the
-Wcfront flag; otherwise, c89 assumes the file contains C source code. For specifying a C++
source file for the native C compilers, one of the following C++ suffixes is required on the c89
command line, as well as the -Wplusplus flag:.ii, .C, .cpp, .c++, or .cc.
Linking Your Program Modules
You can compile and link your application in a single operation by using the OSS c89 or c99
utility. Alternatively, you can compile program modules separately and link them using the
appropriate linking utility (ld, nld, or eld) or the Binder program, depending on the type of
object file you are linking.
Compiling and Linking With the c89 or c99 Utility
Most OSS system library routines are in /usr/lib. For linking, the library routines not found there
are typically found in the common run-time environment, or in the Guardian environment. Other
libraries can be searched using the -L flag of the c89 or c99 utility. See “File Locations for c89
40 The Development Environment