Porting Assistant
Locating the changes


Porting Assistant

Site information

» Send us your comments

Product information

» Products
» Technical information
» Ordering information
» Download software

Related links

» Related web sites

The Porting Assistant runs a series of checks on your code. These checks identify potential problems in compiling, linking, and running your application on Tru64 UNIX. Each check is run on all the files you identified as being a part of your application during setup. A transcript, that is, a log, is produced by a tool called the Builder of the potential problem areas. To see the source corresponding to reported problem, double click on the diagnostic message describing it in the Builder's transcript.

The checks cover

Brief descriptions follow. Clicking on a check name hotspot positions you at the description. To see a screen shot for the check, click on the Porting Assistant icon to the left of the section title.

Ifdef Code

Applications that run on multiple platforms often need some platform-specific code. In many languages, this is commonly dealt with by defining one or more #define values that specify each variant. The #define values are then made part of conditional compilation constructs, such as the #ifdef construct, which designate that the code is for a particular variant. When porting to a new platform, you usually need to define a new variant for the platform and add conditional compilation sequences. Ifdef checking makes it easier to find the locations for the additional platform-specific sequences.

As shown in the screen shot, the check lets you specify a list of #defines to be located. The Porting Assistant lists the standard ones for particular platforms. You can also add your own.

Once you've built the list of #define values to search for, click on the Execute button to find the values appear in your source files.

As shown in the screen shot, the Porting Assistant identifies the location of each reference. The diagnostic message also indicates whether the #if or #else branch would be taken by the compiler based on the #define flags in your original makefile that was processed during setup.

» Top of page

Include Files

Problems with include files are common when porting code from one platform to another. This is because system include files and Motif header files are sometimes present in different locations on different operating systems. There are also cases where certain include files are found on only one system. The Include Files check verifies that all include files specified in your application's source files can be located. The Porting Assistant generates a message in the Builder transcript for any include files that cannot be located. It also generates a message indicating include files of the same name found in a different directory.

» Top of page

32-Bit Dependencies

Because of the 64-bit architecture of the Alpha platform, applications ported from 32-bit platforms may encounter problems in structure alignment and pointer size truncation. The Porting Assistant helps locate those files in an application that may contain 32-bit dependencies. This check is available for C code only.

» Top of page

Function Calls


When porting to Tru64 UNIX, you can use the Porting Assistant to check that your function calls are consistent with the system definitions for the functions. This check will uncover several possible problems:

  • Function does not exist on Tru64 UNIX
  • Function is defined in an alternate location on Tru64 UNIX
  • Function's signature is different on Tru64 UNIX

In the first case, the Porting Assistant can suggest an alternate function. By using the Find Function Utility (screen shot), the Porting Assistant will show you alternate functions on Tru64 UNIX.

In the second and third cases, you can use the Man Page Browser (screen shot). The top of each manpage lists the include file that
defines the function and the library containing the implementation.

» Top of page

Platform Specific Assumptions

Certain functions perform differently at run-time from one platform to the next. The check for platform-specific assumptions searches for function calls that may have this problem. For example:

  • Memory functions can allocate, compare, set, or copy a larger number of locations due to the extended memory range of Alpha systems.
  • You can use the asm keyword to place machine instructions inline.

This check also identifies semantic differences between OpenVMS and UNIX operating systems, for example, the format of file names, directories, nodes, access control lists, and so on. The check can also identify semantic differences between VAX C and DEC C, which are due primarily to VAX C not being fully ANSI compliant.

» Top of page

Search Libraries Capabilities

The Porting Assistant provides library search capabilities for archived and shared libraries on Tru64 UNIX that contain a particular function to facilitate linking applications to the correct archived or shared libraries. This capability enhances the search for referenced functions and the library or libraries where they are defined or whether they exist in the Tru64 UNIX libraries. The search of libraries allows the option of adding or eliminating additional libraries to the search list.

» Top of page


The Makefile check helps in porting an application makefile to Tru64 UNIX by verifying the following:

  • That the actions in the makefile exist, that is, the underlying programs (compilers, linkers, and so on) can be found on the current PATH.
  • That the actions' options and arguments in the makefile are valid on the new platform. (A subset of actions is checked; not all possible actions.)

    These options and arguments are verified based on the source platform, as specified during setup.

[Setup] [Locating] [Understanding] [Making Changes]