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

The _GUARDIAN_TARGET and _OSS_TARGET macros identify a module’s execution environment.
The compiler uses this information to resolve references to external functions in the C run-time
library.
For the TNS compilers, the pragma SYSTYPE GUARDIAN defines the _GUARDIAN_TARGET and
_TANDEM_SOURCE macros. For the native compilers, the pragma SYSTYPE GUARDIAN defines
only the _GUARDIAN_TARGET macro, while the EXTENSIONS pragma defines the
_TANDEM_SOURCE macro. Pragma SYSTYPE OSS defines the _OSS_TARGET and _XOPEN_SOURCE
macros.
If the compiler is running in the Guardian environment and SYSTYPE OSS is specified, the compiler
undefines _GUARDIAN_TARGET before it defines _OSS_TARGET. If the compiler is running in the
OSS environment and SYSTYPE GUARDIAN is specified, the compiler undefines _OSS_TARGET
before it defines _GUARDIAN_TARGET.
Do not define or undefine the _GUARDIAN_HOST, _OSS_HOST, _TNS_E_TARGET, and
_TNS_R_TARGET macros. These macros are for use by the compiler only.
The _TANDEM_ARCH_ macro can be used to compile code conditionally, depending upon the
system architecture used. For example:
#if _TANDEM_ARCH_ == 2
printf ("TNS/E\n");
#endif
#if _TANDEM_ARCH_ != 0
printf ("Native system, not TNS\n");
#endif
The _IGNORE_LOCALE macro selects macros that support only the C/POSIX locale instead of
internationalized functions that support multiple locales. The _IGNORE_LOCALE macro affects
functions in the ctypeh or ctype.h header file.
The native compilers provide four additional feature-test macros. Unlike the previously described
feature-test macros, these four macros do not determine whether a particular set of features will be
included from header files. Instead, these feature-test macros are intended to isolate code by the
environment in which it can be run.
The _IEEE_FLOAT macro is automatically defined by the native C and C++ compilers if IEEE
floating-point format has been specified. For more details, see the pragma IEEE_FLOAT (page 203).
The ENV pragma setting determines which of these native mode feature-test macros is defined:
Identifies code that runs with pragma ENV COMMON set. Pragma ENV COMMON
is the default setting. Such code runs in the user code space and requires the
Common Run-Time Environment (CRE).
_COMMON
Identifies code that runs with pragma ENVEMBEDDED set. Such code runs in the
system code space and cannot use the Common Run-Time Environment (CRE).
_EMBEDDED
Identifies code that runs with pragma ENVLIBRARY set. Such code runs in the
user library space and requires the Common Run-Time Environment (CRE).
_LIBRARY
Identifies code that runs with pragma ENVLIBSPACE set. Such code runs in the
user library or system library space and cannot use the Common Run-Time
Environment (CRE).
_LIBSPACE
These feature-test macros cannot be used to ensure that a C run-time library call can be made in
a particular environment. For more details, see the description of pragma ENV (page 183).
Preprocessor Operators
There are two preprocessor operators, # and ##. The # operator allows you to create a character
string literal when the operator precedes a formal parameter in a macro definition. The ## operator
164 Preprocessor Directives and Macros