Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Introduction to Porting
Open System Services Porting Guide520573-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.