Subsystem Library Functions (OS/2, Windows)

VisualAge C++ provides a static and dynamic linked version of the run-time libraries for use in subsystems. Some VisualAge C++ run-time library functions require a runtime environment and cannot be used in a subsystem. The subsystem libraries contain the library functions that do not require a runtime environment, including the extensions that allow low-level I/O.

There are three groups of functions that you can use in a subsystem:

  1. The functions listed below are available regardless of whether your code is being optimized.
  2. Intrinsic functions that are built in are also available regardless of whether your code is being optimized.
  3. You can use intrinsic functions that are not built in only when you are optimizing by building with opt(level, level) and specifying a value that turns on optimization.

The following functions are available in the subsystem library. Some function names are links to implementation notes below the list.

abort
abs
access
atof
atoi
atol
atold
atoll
bsearch
calloc
chmod
_chsize
_clear87
close
_control87
creat
_debug_calloc
_debug_free
_debug_heapmin
_debug_malloc
_debug_realloc
_debug_ucalloc
_debug_uheapmin
_debug_umalloc
div
_dump_allocated_delta
_dump_allocated
dup
dup2
__eof
exit
_filelength
_fpreset
free
_heap_check
_heap_walk
_heapchk
_heapmin
_heapset
isatty
_itoa
labs
llabs
ldiv
lldiv
longjmp
lseek
_ltoa
malloc
memchr
memcmp
memcpy
memmove
memset
_mheap
_msize
open
printf
qsort
read
realloc
_set_crt_msg_handle
setjmp
_setmode
_sopen
sprintf
sscanf
_status87
strcat
strchr
strcmp
strcpy
strcspn
strdup
strncat
strncmp
strncpy
strpbrk
strrchr
strspn
strstr
strtol
strtoul
strtoull
_tell
_uaddmem
_ucalloc
_uclose
_ucreate
_udefault
_udestroy
_udump_allocated
_udump_allocated_delta
_uheap_check
_uheap_walk
_uheapchk
_uheapmin
_uheapset
_ulltoa
_ultoa
_umalloc
umask
_uopen
_ustats
va_arg
va_end
va_start
vprintf
vsprintf
write

All of the functions in the subsystem libraries are reentrant except the memory allocation functions calloc, malloc, realloc, and free.

The subsystem library versions of atoi and atol do not use the locale information that the standard library versions use.

Functions atexit and _onexit are not provided, but you can call exit.

You must write your own exception handler when you use longjmp or setjmp in a subsystem on OS/2.

The implementations of printf, sprintf, sscanf, vprintf, or vsprintf have the following difference from the versions in the non-subsystem run-time library:

For portability, do not use other versions of va_start, va_arg, and va_end.
On OS/2 these functions are mapped onto macros.
On Windows, the mappings are listed below:



Subsystems
Run-Time Library Environments


Initialize and Terminate Your DLL Environment
Choose Your Run-Time Library
Build Subsystems


Build Options