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

Table 32 Development Platform Capabilities (TNS Programs) (continued)
YesYesRun Guardian TNS programs?
Yes (G-series only)NoRun OSS TNS programs?
These restrictions apply to developing Guardian TNS programs with OSS tools:
The TNS versions of OSS tools are not available on TNS/E systems.
You cannot use the NOWIDE, NOXMEM, and NOXVAR pragmas. Therefore, you can develop
programs that use only the 32-bit or wide data model.
You cannot use the RUNNABLE and SEARCH pragmas. However, you can direct the TNS c89
utility to bind implicitly after a compilation. You can also specify library files to be searched
using the TNS c89 -L flag.
You cannot use the SSV pragma. To specify search directories, use the TNS c89 -I flag.
Specifying Header Files
The macros and functions in the C run-time library are declared in header files. Each header file
contains declarations for a related set of library functions and macros, in addition to variables and
types that complete that set. If you use a function in the library, you should include the header file
in which it is declared. You should not declare the routine yourself, because the declarations in
the header files have provisions for several situations that can affect the form of a given declaration,
including:
Whether the routine is implemented internally as a function or a macro
Whether the function is written in a language other than C
Whether you are compiling for the small-memory or large-memory model
Whether you are compiling for the 16-bit or 32-bit (wide) data model
Whether you are compiling for the NonStop environment
In addition, the header file prototype declarations enable the C compiler to check parameters and
arguments for compatibility, ensuring that function calls provide the correct number and type of
arguments.
A single set of C library header files support both the Guardian and OSS environments. In the
Guardian environment, header files are in $SYSTEM.SYSTEM and $SYSTEM.ZTCPIP by default.
In the OSS environment, header files are in /usr/include and its subdirectories by default.
To specify header files, use the #include preprocessor directive. For more details and examples,
see Chapter 12: Preprocessor Directives and Macros.
In the Guardian environment, the SSV pragma specifies a search list of subvolumes for files specified
in #include directives. For more details, see the description of pragma SSV (page 244).
In the OSS environment, the TNS c89 utility -I flag specifies a search list of directories for files
specified in #include directives.
The TNS c89 utility is located in the /nonnative/bin directory on D40 and later releases; this
utility is not available in H-series RVUs. By default, the native c89 utility is run. You must set
/nonnative/bin at the start of your PATH environment variable to get the TNS c89 utility instead
of the native c89 utility.
For more details, see the TNS c89 online reference page. To view this reference page, enter:
man -M /nonnative/usr/share/man c89
The c89 reference page in D40 and later versions of the Open System Services Shell and Utilities
Reference Manual describes the native c89 utility.
262 Compiling, Binding, and Accelerating TNS C Programs