Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Open System Services Porting Guide—520573-006
3-1
3 Useful Porting Tools
By using the proper tools, you can significantly reduce the time and cost of porting
programs written in the C or C++ language from one computing platform to another.
Some tools check for the compatibility of C language source statements with the
ISO/ANSI C standard, while others are useful for determining which routines used by
the program are not available on the platform to which the program is being ported.
Because standards requirements are complicated and quite extensive, use an
automated porting checker for the following purposes:
•
To consistently demonstrate that your programs conform to standards and are
available on new platforms
•
To ensure that consistent results can be obtained in secure and sensitive
environments
•
To bring products to market quickly and within moderate operating margins
•
To reduce maintenance costs of existing products and quickly debug new code
The following subsections provide an overview of popular porting tools available for the
UNIX workstation:
•
lint Tool on page 3-1
•
findcalls Tool on page 3-2
•
CodeCheck Tool on page 3-3
•
Open Systems Portability Checker (OSPC) Tool on page 3-4
The purpose of this section is to provide an introduction to the concepts involved when
using porting tools to enhance the efficiency of porting applications and other
programs. For more information about using or obtaining these and other porting tools,
and how to use them when porting code to the OSS environment, contact your service
provider.
lint Tool
The lint tool is very important to portable C programming. lint examines
C language source programs, detecting bugs, inconsistencies, and poor constructs.
lint helps you follow a number of portability rules when moving programs from one
platform to another or between different operating systems. lint accepts multiple
input files and library specifications and checks them for consistency.
Although lint is very helpful for writing portable code, its importance is becoming
more of a historic one. It was one of the first porting tools available, and is still a
standard tool on UNIX machines. Today, there are more powerful porting tools
available, such as CodeCheck and OSPC (both discussed later in this section). lint
is not available on NonStop systems.
In addition, C compilers today perform most of the checking done by lint; this
includes the HP C compiler, which does stricter checking than many conventional