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

source_file
is the file name of the source file you want to include. In the Guardian environment, the compiler
searches for source_file using the SSV search list. In the OSS environment, the compiler
searches for source_file using operands specified in the c89 or c99 utility -I flag.
library_header_file
is the name of the library header file you want to include. The compiler assumes that library
header files reside in the same volume and subvolume (in the Guardian environment) or directory
(in the OSS environment) as the compiler. In the Guardian environment, the compiler searches
for library_header_file using the SSV search list. In the OSS environment, the compiler
searches for library_header_file using operands specified in the c89 or c99 utility -I
flag.
section_list
is a parenthesized, comma-separated list of section names found in the specified source file
or library header file. Sections are created using the SECTION pragma, which is discussed in
SECTION (page 237).
This is an HP NonStop extension to the standard.
nolist
directs the compiler not to list the contents of the file or sections being included.
This is an HP NonStop extension to the standard.
newline
is the newline character that terminates the directive line.
Usage Guidelines
You can enter the #include directive on the command line or in the source text.
The #include directive specifies a pathname that the compiler searches before looking in
the usual places.
The way that you specify a #include directive affects the search:
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 in the
OSS or Windows directory containing the source file.
If the file is not found, the directive searches in the compiler's Guardian volume and
subvolume (e.g. $system.system) or in the OSS or Windows directory (e.g.
$COMP_ROOT/usr/include, the OSS or Windows default location, with $COMP_ROOT
being a user-defined environment variable).
NOTE:
On OSS, standard headers are installed in the OSS default location. Typically on
OSS systems, this environment variable is not explicitly defined, so the default location
gets expanded to /usr/include.
On Windows, standard headers are not installed in /usr/include. So, if you do
not define the Windows environment variable, you will need to explicitly add the
location of the standard headers using the -I directive when you invoke the compiler.
158 Preprocessor Directives and Macros