Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (c) c89(1)
• An executable file produced by the nld utility
• A module definition file created by the NonStop SQL/MX preprocessor.
When the -Wsql flag is specified, C source files that contain embedded NonStop SQL/MP infor-
mation can have names suffixed with .c or .ec. When the -Wsqlmx flag is specified, c89 uses the
source file filename extension to determine the language mode (C or C++) and the names of the
source files created by the NonStop SQL/MX preprocessor.
The name of a created source file is the name of the primary source file plus one of the following
extension transformations:
• If the primary source file suffixis.ec or .sql and the -Wcpluplus flag is not specified, the
created source file has the suffix .c and uses the C language mode.
• If the primary source file suffixis.ec or .sql and the -Wcplusplus flag is also specified,
the created source file has the suffix .cpp and uses the C++ language mode.
• If the primary source file suffixis.eC, .ecpp, .ec++, .ecc,or.ecxx, the created source file
has the suffix .C, .cpp, .c++, .cc,or.cxx, resapectively, and uses the C++ language mode.
When c89 is passed a file name suffixed with .C, .cpp, .c++, .cc,or.cxx, that file is not passed to
the NonStop SQL/MX preprocessor. Such files are assumed to contain only C or C++ statements
without embedded NonStop SQL/MX information.
Output Files
An output file can be a preprocessed source file, an object file, or an executable file.
Standard Output File
The standard output file is empty unless a -E, -WM,or-WP flag is specified. If one of these
flags is specified, preprocessed source code is sent to the standard output file. When -WH is
used, the standard output file contains a line indicating which file is currently being operated
upon.
Standard Error File
The standard error file contains diagnostic and informational messages from c89 and the compi-
lation components it calls. If more than one source file operand is specified, then for each such
file the format "%s: \n",file is used to print the name of the source file before it is processed.
Standard Libraries
The c89 utility recognizes the following -l operands for standard libraries.
-l c Contains all library functions provided by HP that are specified in the XPG4 Version 2
(X/Open UNIX) specification, including those functions listed as residing in the
math.h header file.
-l C Contains the correct C++ run-time libraries, based on the value of the -Wversionn flag.
If the -Wversionn flag is omitted, the default version C++ library is used.
When you specify the -Wcplusplus and -Wversionn flags, you need not specify -l C;
all needed libraries are automatically linked. For TNS/R programs, this includes the
cppinit[n].o and main function (_MAIN). When you specify the -Wversion2 flag,
cppinit.o is linked for a nonPIC program or cppinit2.o is linked for a PIC program.
When you specify the -Wversion3 flag, cppinit3.o is linked for a nonPIC program or
cppinit4.o is linked for a PIC program.
527188-004 Hewlett-Packard Company 2−23