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
The Development Environment
Open System Services Porting Guide—520573-006
2-12
C and C++ Compilation Using the c89 Utility
utility. The H-series TNS C and C++ compilation tools run in the Guardian environment
only.
The TNS C and C++ compilation tools are not supported on PCs or in the H-series
OSS environment. The code files and reference pages for the TNS C and C++ tools
are located in the OSS /nonnative directory.
Depending on the flags and input file operands you include on the c89 command line,
the TNS C compiler can perform the following operations:
1. Compile any source C and C++ files into object files
2. Bind object files with any libraries specified on the command line into a single
program file (unless the -c or -Wnobind flag is specified)
3. If the program is going to run in a TNS/R native environment, use the Accelerator
program to optimize performance
4. If the program is going to run in an H-series Guardian environment, use the Object
Code Accelerator program to optimize performance
5. If the program contains embedded SQL statements, use an SQL compiler as the
final step
TNS/R Native c89 Flags and TNS c89 Flags
The c89 flags support compiling, linking, and optimizing and are used for setting
compiler pragmas. The native c89 utility supports more flags and pragmas than does
the TNS c89 utility. In some cases, flags for a compilation options have a different
name between the native c89 and TNS c89 utilities. If you are familiar with the TNS
c89 flags and wish to use the native c89 utility, refer to the TNS/R Native Application
Migration Guide for c89 flag mapping information.
For a detailed description for each c89 flag, refer to the c89(1) reference pages. The
TNS/R and TNS/E c89(1) reference pages are available either online or in the Open
System Services Shell and Utilities Reference Manual; the TNS c89(1) reference
page is available online in the /nonnative/usr/share/man set of reference pages.
Displaying c89 Help
To display help information for running c89, you can enter a c89 help flag on the
native c89 command line. No compilation system components are run with -Whelp or
-Wusage. Additionally, you can refer to the appropriate copy of the c89(1) online
reference page. The TNS/R and TNS/E c89(1) reference pages are available either
online or in the Open System Services Shell and Utilities Reference Manual; the TNS
c89(1) reference page is available online in the /nonnative/usr/share/man set
of reference pages.