Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

fopen_guardian(3) Guardian Native C Library Calls Reference Manual
Explicit calls to the fopen_oss() and fopen_guardian() variants in source code are only made
when the behavior of one environment is desired from the other environment.
fopen_oss( ) is functionally identical to the fopen( ) function of the OSS environment. It is the
same as setting systype oss at compile-time. systype oss is the default setting for c89 in
the OSS environment and on UNIX workstations.
fopen_guardian() is functionally identical to the fopen( ) function of the Guardian environment.
It is the same as setting systype guardian at compile-time. systype guardian is the
default setting for the C and C++ compilers in the Guardian environment.
To use the fopen_oss() or fopen_guardian() functions, specify the _TANDEM_SOURCE
feature test macro.
RETURN VALUES
If the fopen() function succeeds, a pointer to the stream is returned. If the fopen() function fails,
a null pointer is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the fopen() function sets errno to the corresponding value.
[EINVAL] The mode parameter is not a valid mode.
[EMFILE] The OPEN_MAX le descriptors are currently open in the calling process.
[ENFILE] Too many les are currently open in the processor.
[ENOENT] The named le does not exist or the lename parameter points to an empty
string.
[ENOMEM] Insufcient space to allocate a buffer.
[EOVERFLOW]
The size of the le cannot be represented in an object of type off_t.|
For all other error conditions, errno is set to the appropriate Guardian le-system error number.
Refer to the Guardian Procedure Errors and Messages Manual for more information about a
specic Guardian le-system error.
RELATED INFORMATION
Functions: open(2), fclose(3), fopen(3), fopen64_guardian(3), fopen_oss(3), freopen(3),|
fseek(3), setbuf(3).
STANDARDS CONFORMANCE
The fopen_guardian() function is an HP extension to the XPG4 Version 2 specication.
242 Hewlett-Packard Company 527192-007