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

If you use SSV pragmas with TNS C, the compiler subvolume is not searched. Consequently,
if your program needs any standard header file, you must add a search subvolume (SSV) for
the system library.
For example, if you specify any SSV pragmas and your program contains a standard library
file header such as #include <stdioh>, you must have an SSV pragma for
$system.system” (the location of the stdioh file on the NonStop host), because the
compiler does not automatically search the compiler subvolume.
If you specify SSV pragmas, the compiler does not distinguish between standard header files
and user-defined files. The files are searched according to the SSV search list that you specified.
When using an SSV search list with the native compilers, the default subvolume is searched.
Therefore, you do not need to add an SSV pragma for the default subvolume in native mode.
When using SSVs with the TNS compilers, however, you do need to add an SSV pragma for
the default subvolume.
For the default searching paradigm used with #include directives, see #include (page 157).
The way that you specify a #include directive affects the operation of an SSV search list or
a Directories list (in TDS on the PC):
For the TNS C compiler, the include directive searches for the specified file (in double
quotes) in the current default Guardian volume and subvolume. If the file is not found,
the directive searches in the compiler's Guardian volume and subvolume (e.g.
$system.system). If pragma SSV<n> is used, the Guardian subvolumes are then
searched.
For the TNS/R C compiler and the TNS/E C compiler, the include directive searches
for the specified file (in double quotes) in the Guardian volume and subvolume or OSS
directory containing the source file. If the file is not found, the directive searches in the
compiler's Guardian volume and subvolume or OSS directory (e.g. $system.system
on Guardian and /usr/include on OSS). If pragma SSV< n> or the c89 -I flag is
used, the Guardian subvolumes or OSS directories are then searched.
SSV pragmas on the command line take precedence over SSV pragmas in source files; that
is, those in source files are appended to those from the command line. If no SSV pragma
appears on the command line, two are implicitly created (without user notification) for the
current subvolume and compiler subvolume. This gives those locations precedence over any
SSV pragmas in source files, including CPATHEQ files. To override the default SSV pragmas,
specify at least one SSV pragma on the command line.
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.
[NO]STDFILES
246 Compiler Pragmas