The C programming interface described in this manual consists of over 500 functions, macros and external variables. This includes all functions defined in the ANSI Standard and required by the X/Open Portability Guide Issue 4, Version 2, called XPG4 Version 2 for short. The optional "Encryption" function group of XPG4 and numerous other extensions are also supported.
The C programming interface presented here is a component of the C runtime library (BS2000) which, in turn, is a component of the Common Runtime Environment CRTE. The POSIX subsystem must be loaded in order to obtain the full functionality of the C library functions described in this manual.
The interfaces described in this manual are available in CRTE V10.1A or CRTE V11.1A and higher and in BS2000/OSD-BC V10.0 and higher.
The C library functions provide a convenient method of programming many tasks for which no higher-level language facilities are included in C itself. Typical examples of such programming tasks include:
processing of files (open, close, seek, read, write, etc.)
processing of individual characters or strings (search, change, copy, delete etc.)
dynamic memory management (allocation and deallocation of storage areas, etc.)
access to the operating system
use of mathematical functions
All functions in the reference section "Functions and variables in alphabetical order" which are not identified as "extensions" in the title behave in conformance with the above standards (see following section). Extensions to the functionality of individual functions and provisional restrictions until branding are indicated explicitly in each description.
Extensions
Besides the international standards mentioned above, the C library supports BS2000-specific functions (see also the "manual "C Library Functions" [6]) as well as numerous other extensions which are supported on many UNIX systems. The extensions from the BS2000-specific functions are identified in the titles of the reference section by the keyword BS2000. Additional extensions are identified by the keyword extension. This explicit identification of extensions is intended to facilitate the development of portable programs.
The functions for input/output, signal handling and the locale support extensions that are compatible with earlier versions of the C runtime library. In particular, both the data management system of BS2000 (DMS) as well as the XPG4 Version 2 conformant POSIX file system can be accessed (see the manual "POSIX Basics" [1]).
The following are also available as additional extensions:
64 bit function to support NFS V3.0
Functions to support POSIX threads in the C runtime library
Restrictions
This version of the C runtime library is subject to the following restrictions as opposed to XPG4 Version 2:
When the environment (external variable environ
) is reinitialized using putenv()
, the file system defaults to DMS, so the user must explicitly set PROGRAM-ENVIRONMENT
to SHELL
(see the section "Selecting functionality" and the manuals "C Compiler" [3] and "C/C++ Compiler" [4]).
Specific restrictions are indicated where relevant under the actual function descriptions.