Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
OSS environment doesn’t exceed the guaranteed limits, it should successfully compile with the
NonStop C compiler.
C Data Types
The integral data types and the floating point data types supported in the C compilation environments
are specified in limits.h and float.h header files, respectively.
Beginning with the H06.24 and J06.13 RVUs, both the ILP32 and LP64 data models are supported
by the NonStop C/C++ compilers. For information about these data models, see the 64-Bit Support
in OSS and Guardian chapter in the Open System Services Programmer's Guide.
OSS C Run-Time Library
The TNS/R and TNS/E native C run-time libraries used by Open System Services contains more
than 300 predefined macros and functions. The C run-time library supports both the OSS and
Guardian environments. It consists of the complete list of functions specified by the ISO/ANSI C
standard, additional functions specified by the XPG4 specifications, and functions specific to HP.
Many C run-time library functions are identical, regardless of the environment. However, there are
both OSS and Guardian versions of some functions.
Guardian and OSS API interoperability is provided by making the OSS C and Guardian C APIs
similar to one another. The C run-time library supports two variants of some functions that support
different semantics in the OSS environment from in the Guardian environment. Environment-specific
functions such as fopen() have a variant for each environment: fopen_oss() and
fopen_guardian(). See “Environment-Specific Functions” (page 74) 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 Chapter 5 (page 71).
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.
Chapter 5 (page 71) 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:
Maximum length, in bytes, of the arguments for one of the exec or tdm_execve sets of
functions, including the environment data
ARG_MAX
Maximum number of simultaneous processes for each real user IDCHILD_MAX
Number of clock ticks per secondCLK_TCK
120 Porting UNIX Applications to the OSS Environment