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
Introduction to Porting
Open System Services Porting Guide—520573-006
1-4
Porting Is Easier When Standards Are Used
XPG4 Specifications and OSS Compliance
The XPG4 specifications, sometimes referred to as the X/Open CAE Specifications,
are commonly used in the industry but were not defined by an accredited standards
committee. They were defined by X/Open, an international vendor consortium based in
Reading, England, that defined specifications for open systems. The successor to
X/Open is the Open Group; information about the Open Group and the XPG4
specifications can be found at http://www.opengroup.org.
Open System Services is complaint with both XPG4 and XPG4 Version 2. Some of the
OSS internationalized system calls, libraries, commands, and utilities are only
compliant with the older XPG3 specifications. Not all vendors deliver UNIX products
that are compliant with XPG4 specifications. X/Open does not specify the
implementing language; it is specified by the ISO/ANSI C standard. One can use
ISO/ANSI C or Common C compilers and still be XPG4 compliant.
OSS reference manuals describe extensions that are specific to HP for some function
calls and commands. Most calls and commands provide POSIX or ISO/ANSI C
behavior. If you want to take advantage of the Guardian environment, you need to use
some of the HP extensions. To port applications to the OSS environment, refer to the
XPG4 documents.
OSS Compliance With UNIX 98 and Other Open Group
Technical Standards
In general, current Open Group standards are supersets of the XPG4 specifications.
Standards such as the Single UNIX Specification, Version 2, are provided for vendors
who want to achieve branding of a product as (for example) UNIX 98. (The OSS
environment is not branded.)
When a specific OSS function or command is XPG4-compliant, it is compliant with the
Open Group successor standard as well. However, not all features defined by the
Single UNIX Specification are available in the OSS environment. For example, certain
feature test macros such as _XOPEN_LEGACY are not provided and the feature test
macro _XOPEN_SOURCE does not have the value 500.
Open System Services provides many of the APIs and utilities found in the UNIX 98
operating systems. In particular, OSS provides the APIs and utilities used for
developing and managing server applications, as opposed to client applications.
ISO/ANSI C Standard and the HP NonStop C Compiler
The ISO/ANSI C standard specifies C language semantics. It specifies the language
syntax for C, C header files, and the C run-time library routines. The ISO/ANSI C
standard is documented by ANSI and ISO.
The HP NonStop C compiler is ISO/ANSI C compliant and does not support
compilation of Common C programs.