Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
c89(1) OSS Shell and Utilities Reference Manual
c89 performs the following steps:
1. If the corresponding -W flag is specified, invokes an SQL preprocessor to process any
embedded SQL statements in C or C++ source files, creating C only, C++ only, or
module definition files as appropriate.
2. Compiles any specified C and C++ source files or source files produced by Step 1 into
object files.
3. If the -Wmxcmp flag is specified, invokes the NonStop SQL/MX compiler to process
files created by Step 1 or specified as module definition files in the command.
4. Links the object files together with any libraries specified on the command line. (This
occurs if no flags that prevent linking are specified and the source files are compiled
without errors.)
5. If the -Wsqlcomp flag is specified, invokes the NonStop SQL/MP compiler to process
files created by Step 1 or specified in the command.
6. Writes an executable object file or library to the file specified by a -o flag (if present) or
to the file a.out.
Libraries can be:
• Archives, with a suffixof.a
• DLLs, with a suffixof.so
• TNS/R native user libraries
• TNS/R native SRLs, with a suffixof.srl
The default executable file in the Guardian file system is aout in the subvolume from which c89
is invoked.
If only a single source file is given and no flags that suppress linking are specified, then the file is
compiled into an object file and linked into an executable object file. If the executable file is
created successfully, the object file is removed.
c89 places object files (loadfiles) in the current working directory with the same base name as the
corresponding source file, but with a suffixof.o.
c89 also names several temporary or intermediate files that are created during the compilation
process. Like the output object file, c89 places these files in the current working directory. c89
removes these temporary or intermediate files unless the -Wsavetemps flag is specified.
If -Wsystype=oss is set, the C and C++ compilers define the predefined feature-test macros
_OSS_TARGET and _XOPEN_SOURCE.If-Wsystype=guardian is set, the C and C++ com-
pilers define the predefined feature-test macros _GUARDIAN_TARGET and
_TANDEM_SOURCE. These macros are used in the standard header files to determine the exe-
cution environment of a program. The feature-test macros can also be defined with a -D flag.
Because these macros are defined internally, not by c89, the macros are not defined when
-Wdryrun or -Wv are used.
2−20 Hewlett-Packard Company 527188-007