HP OpenVMS Systems


HP OpenVMS Systems

OpenVMS information

» What's new on our site
» Upcoming events
» Configuration and buying assistance
» Send us your comments

HP OpenVMS systems

» OpenVMS software
» Supported Servers
» OpenVMS virtualization
» OpenVMS solutions and partners
» OpenVMS success stories
» OpenVMS service and support
» OpenVMS resources and information
» OpenVMS documentation
» Education and training

UNIX Portability

» Roadmap
» File System
» Future Plans

Evolving business value

» Business Systems Evolution
» AlphaServer systems transition planning
» Alpha RetainTrust program

Related links

» HP Integrity servers
» HP Alpha systems
» HP storage
» HP software
» HP products and services
» HP solutions
» HP support
disaster proof
HP Integrity server animation
HP Integrity server animation
Content starts here

OpenVMS C Run-Time Library (C RTL)

In general, UNIX features in the C RTL are enabled by using logical name switches or an API. In this way, the existing behavior becomes the default and is preserved.

The C RTL is being extended with each release of OpenVMS, for OpenVMS Version 8.2 the following functions build upon those introduced in OpenVMS Version 7.3-2.

OpenVMS v7.3-2

The following C RTL additions are part of OpenVMS v7.3-2.

UNIX-style user and group IDs
setpgrp — set process group ID
setregid — set the real and effective group IDs
setreuid — set the real and effective user IDs
getsid — get the process group ID of the session leader
setsid — create the session and set the process group ID

User database functions
getpwnam_r — search user database for a name (reentrant)
getpwuid_r — search user database for a user ID (reentrant)

Signal functions
sigwait — wait for queued signals
sighold — add a signal to the signal mask
sigrelse — remove a signal from the signal mask
sigignore — set the signal to be ignored

Time functions
nanosleep — high resolution sleep
clock_getres — get resolution of a clock
clock_settime — set clock to value
clock_gettime — get current value of a clock

I/O functions
pread — read from a file
pwrite — write on a file
readv — vectored read
snprintf — print formatted output (N bytes)
vsnprintf — print formatted output of a stdarg argument list

Math functions
rand_r — reentrant version of rand random number generator
a64l, l64a — convert between a 32-bit integer and a radix-64 ASCII string
remainder — remainder functions
rint — round-to-nearest integral value

OpenVMS v8.2

The following C RTL additions are part of OpenVMS v8.2.

New X/Open file-locking functions

These APIs allow applications to lock and unlock files and provide access synchronization across threaded programs.

Standard-compliant stat structure
An X/Open standard-compliant definition of the 'stat' structure. Associated definitions have now been added.

File-systems statistics support
Statvfs—X/Open function that returns file system information
fstatvfs—X/Open function that returns file system information
fcntl—File status flags. The F_SETFL and F_GETFL command options have been added to the fcntl function to set and get file status flags.

UNIX-style pipe support
DECC$STREAM_PIPE—The C RTL pipe implementation now uses stream I/O as well as record I/O under control of this new feature logical.

DECC$POPEN_NO_CRLF_REC_ATTR—UNIX systems do not insert CR/LF for pipes. This new feature logical provides UNIX compatible behavior.

64-Bittglob and globfree support
socketpair—The socketpair TCP/IP socket routine has been added for creating a pair of connected sockets.

64-bit support is added for glob and globfree functions.