TNS/R Native Application Migration Guide
C and C++ Migration Tasks
TNS/R Native Application Migration Guide—523745-001
3-2
Using the Native C and C++ Migration Tool
This section assumes your program can be compiled by a D20 or later version of the
TNS C compiler or TNS C++ preprocessor. It also assumes your program runs on a
D20 or later version of the operating system. See the C/C++ Programmer’s Guide for
information on converting C programs from C-series to D-series RVUs.
Using the Native C and C++ Migration Tool
The native mode C and C++ migration tool scans source files and produces a
diagnostic listing. The diagnostic listing identifies HP C for NonStop Systems and
HP C++ for NonStop Systems language source code changes required to migrate from
TNS C and C++ to native C and C++. The migration tool detects most but not all
changes described in this section, which covers:
•
Running NMCMT in the Guardian Environment
•
Running nmcmt in the OSS Environment on page 3-4
The migration tool does not detect:
•
Changes required in areas outside the C and C++ languages, such as the
Guardian and CRE application program interface (API).
•
Changes described in the following subsections:
°
Converting Code to Use 32-Bit Pointers and Integers on page 3-6
°
Changing Code That Relies on Arithmetic Overflow Traps on page 3-15
°
Using the Tools.h++ Class Library on page 3-16
You can use the migration tool in the Guardian or OSS environment. The native
migration tool is also available on the PC in both ETK and TDS. You can download the
native migration tool for ETK from the web.
Running NMCMT in the Guardian Environment
The command syntax for NMCMT is nearly identical to the command syntax for the
TNS C compiler, as shown in the following diagram.
[ RUN ] NMCMT
is the TACL command to start the NMCMT process.
source
specifies a Guardian filename for the source file to analyze. The file can be type
101 (edit file) or type 180 (C file). Additional source files can be specified by using
#include directives in the source file.
[ RUN ] NMCMT / IN source [ , OUT listing ] /
[ , run-option [ , run-option ]... ]
[ ; compile-option [ , compile-option ]... ]