C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-99
STDFILES
Examples
1. This example specifies three search subvolumes:
c / in testc, out $s.#xxx / obj;run,ssv0 "$a.b", ssv1 "$b.d",
ssv2 "$system.system"
2. This example specifies a search subvolume ($A.B) and a search volume ($C):
#pragma ssv0 "$a.b", ssv1 "$c"
STDFILES
The STDFILES pragma controls the automatic opening of the three standard files:
stdin, stdout, and stderr. The STDFILES pragma allows the C library to
automatically open the three standard files. The NOSTDFILES pragma suppresses the
automatic opening of these files.
The pragma default settings are:
Usage Guidelines
For the native compilers, the STDFILES pragma can be entered only on the
compiler RUN command line. For the TNS compilers, the pragma can be specified
with the -W[no]stdfiles flag of the c89 utility.
The C compiler defaults to STDFILES if pragma SYSTYPE GUARDIAN is specified.
You cannot specify the STDFILES pragma if pragma SYSTYPE OSS is specified.
The compiler issues a warning.
The STDFILES pragma is effective only for compiling the module that contains the
main function. These pragmas have no meaning for other modules, and the
compiler issues a warning if the pragmas are used with other modules.
In a mixed-language program, the three standard files are not automatically
opened unless the module containing the main function is written in the C
programming language. If you need to open any of the three standard files for I/O
operations in the C language, explicitly open each file by calling the
fopen_std_file() function.
[NO]STDFILES
SYSTYPE GUARDIAN SYSTYPE OSS
TNS C compiler STDFILES N.A.
G-series TNS c89 utility STDFILES N.A.
TNS/R native C and C++ compilers STDFILES N.A.
Native c89 utility STDFILES N.A.
TNS/E native C and C++ compilers STDFILES N.A.