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
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide—520573-006
7-17
OSS C Run-Time Library
Functions on page 5-5 or the Open System Services Programmer’s Guide for more
information on these functions.
When porting UNIX programs to the OSS environment, use only the OSS C run-time
library functions. If you wish to access a routine in the Guardian C run-time library, you
must use mixed-module programming techniques, discussed in Section 5,
Interoperating Between Programming Environments.
The semantics and syntax of the OSS C run-time library routines are described in the
Open System Services Library Calls Reference Manual. The semantics and syntax of
the Guardian C run-time library routines are described in the Guardian Native C Library
Calls Reference Manual.
OSS and Guardian APIs
The complete set of standard functions available in the OSS API is provided in the
Open System Services Programmer’s Guide, which includes two API interoperability
tables, listing the OSS and Guardian C run-time library calls. A great amount of
interoperability exists between the OSS and Guardian APIs. The behavior of a function
or macro can depend on the module and process from which it is called.
Section 5, Interoperating Between Programming Environments, discusses the API
interoperability tables further, as well as the interoperability between OSS and
Guardian files and processes.
System and Process Limit Values
For UNIX environments, system and process limit values are generally defined in
/usr/include/limits.h. However, in the OSS environment, some limit values are
configuration-dependent and are not defined in the limits.h header file.
The values of the following limits are obtained for the OSS environment using the
sysconf() function:
ARG_MAX Maximum length, in bytes, of the arguments for one of the exec or
tdm_execve sets of functions, including the environment data
CHILD_MAX Maximum number of simultaneous processes for each real user ID
CLK_TCK Number of clock ticks per second
OPEN_MAX Maximum number of files that one process can have open at one
time
STREAM_MAX Maximum number of streams that one process can have open at one
time