Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Open System Services Porting Guide520573-006
10-1
10
Native Migration Overview
This section is intended for OSS and Guardian C or C++ programmers who are
interested in migrating their programs from the TNS environment to the TNS/R or
TNS/E native environment. It contains an overview of the major areas in which
differences exist between the two systems’ development tools, and between the TNS
and native execution environments. Refer to the C/C++ Programmer’s Guide, the
Open System Services Programmer’s Guide, and the Guardian Programmer’s Guide
for detailed information about writing programs for the native environments.
Open System Services (OSS) supports native-mode applications written in C, C++,
and pTAL for the native environments. Programs written for D3x RVUs can still run the
native environments in TNS interpreted or accelerated mode, but benefits can be
achieved by migrating these programs to native mode. It is faster to compile programs
in native mode than to compile and accelerate programs in TNS accelerated mode.
The TNS/R and TNS/E native C compilers accept programs written in Common C as
well as those written in ISO/ANSI C. More OSS and Guardian API interoperability is
provided in the OSS and Guardian APIs that use the native environments.
You need to be concerned about the TNS and native C compiler development and
debugging tools, the differences in the C language syntax supported by the TNS and
native compilers, the differences in the C run-time library routines, and differences in
the Guardian API that supports the native environments. More detailed information to
help you migrate your applications to run in native mode is available in the TNS/R
Native Application Migration Guide and the H-Series Application Migration Guide.
The topics included in this section are:
General Migration Issues on page 10-1
Native Environment Features on page 10-2
C Development Tools on page 10-4
User Library Migration Issues on page 10-5
C Language Compilers on page 10-6
Using the C Run-Time Library on page 10-7
Guardian Procedure Features on page 10-9
TAL to pTAL Conversion on page 10-10
General Migration Issues
TNS/R and TNS/E native environments support three execution environment modes:
TNS interpreted, TNS accelerated, and native mode. Major differences among these
modes include support for the Kernel-Managed Swap Facility (KMSF), shared run-time
libraries (SRLs), dynamic-link libraries (DLLs), and signals replacing traps in the
Guardian environment.