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-60
MAPINCLUDE
MAPINCLUDE
The MAPINCLUDE pragma specifies how to transform file names within #include
directives.
The pragma default settings are:
Usage Guidelines
The MAPINCLUDE pragma can be specified only in the source file.
PRAGMA MAPINCLUDE "from"="to" directs the compiler to replace any name in
an #include directive that fully matches the from string with the to string.
PRAGMA MAPINCLUDE PATH "from"="to" directs the compiler to replace any
directory pathname in an #include directive that begins with the from string with
the to string.
PRAGMA MAPINCLUDE FILE "from"="to “ directs the compiler to replace any
file name in an #include directive that ends with the from string with the to
string.
Only one MAPINCLUDE pragma without PATH or FILE can be performed on each
#include.
A MAPINCLUDE FILE and a MAPINCLUDE PATH can both operate on the same
#include.
Only one MAPINCLUDE pragma can be specified for each from string.
For additional guidelines and examples of using the MAPINCLUDE pragma with
class libraries such as Tools.h++, see Pragmas for Tools.h++ on page 6-6.
These two examples illustrate the significance of specifying or omitting the FILE
option with the MAPINCLUDE pragma. You have these two #include directives:
#include "machin.h"
#include "n.h"
MAPINCLUDE [ FILE | PATH ] "from" = "to"
SYSTYPE GUARDIAN SYSTYPE OSS and PC
TNS C compiler Not set Not set
G-series TNS c89 utility N.A. N.A.
TNS/R native C and C++ compilers Not set Not set
Native c89 utility N.A. N.A.
TNS/E native C and C++ compilers Not set Not set