Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
fopen64_guardian(3) Guardian Native C Library Calls Reference Manual
of fopen64() does not distinguish between text and binary files. Text and binary files in the OSS
environment are type 180. For information on the ANSISTREAMS pragma, see the C/C++
Programmer’s Guide.
The default number of secondary extents for files created by fopen64() is 16. The default number
of maxextents for files created by fopen64() is 500.
Interoperability Variants
The C run-time library supports two variants of the fopen64() function: fopen64_oss() and
fopen64_guardian(). The variants support the unique file-naming conventions and structures of
the OSS and Guardian file systems, respectively.
Explicit calls to the fopen64_oss() and fopen64_guardian() variants in source code are only
made when the behavior of one environment is desired from the other environment.
fopen64_oss() is functionally identical to the fopen64() 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.
fopen64_guardian() is functionally identical to the fopen64() function of the Guardian environ-
ment. 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 fopen64_oss() or fopen64_guardian() functions, specify the _TANDEM_SOURCE
feature test macro.
RETURN VALUES
If the fopen64() function succeeds, a pointer to the stream is returned. If the fopen64( ) function
fails, a null pointer is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the fopen64() function sets errno to the corresponding value.
[EINVAL] The mode parameter is not a valid mode.
[EMFILE] The OPEN_MAX file descriptors are currently open in the calling process.
[ENFILE] Too many files are currently open in the processor.
[ENOENT] The named file does not exist, or the filename parameter points to an empty
string.
[ENOMEM] Insufficient space to allocate a buffer.
[EOVERFLOW]
The size of the file cannot be represented in an object of type off64_t.
For all other error conditions, errno is set to the appropriate Guardian file-system error number.
For more information about a specific Guardian file-system error, see the Guardian Procedure
Errors and Messages Manual.
RELATED INFORMATION
Functions: open(2), fclose(3), fopen64(3), fopen64_guardian(3), fopen64_oss(3), freopen(3),
fseek(3), setbuf(3).
STANDARDS CONFORMANCE
The fopen64_guardian() function is an HP extension to the XPG4 Version 2 specification.
2−68 Hewlett-Packard Company 527192-018