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

Guardian Native C Library Calls (f) fopen64_guardian(3)
NAME
fopen64_guardian - Opens a stream (Guardian fopen64( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <stdio.h>
FILE fopen64(
const char lename,
const char mode);
FILE fopen64_guardian(
const char lename,
const char mode);
PARAMETERS
filename Points to a character string that contains the name of the le to be opened. To
include a node name in the lename, precede the node name with two
backslashes (\\) instead of one because backslash is an escape character in C.
mode Points to a character string that controls whether the le is opened for reading
(r), writing (w), or appending (a) and whether the le is opened for updating (+).
The character string also controls whether the le is a text le (default) or a
binary le (b).
DESCRIPTION
This function is similar to the fopen_guardian() function except that, in addition to supporting
smaller les, the fopen64_guardian() function supports Guardian les that have an offset max-
imum larger than 4 gigabytes (Guardian Format 2 les).
An application can explicitly call this function when you compile the application using the
#dene _LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler command
option.
An application call to fopen_guardian() is automatically mapped to this function when you
compile the applciation using the #dene _FILE_OFFSET_BITS 64 feature test macro or an
equivalent compiler command option.
The fopen64() Guardian function and fopen64_guardian() function open the le named by the
lename parameter and associate a stream with it, returning a pointer to the FILE structure of
this stream.
These functions are identical in the Guardian environment. Unless otherwise noted, this refer-
ence page uses fopen64( ) to refer to both the fopen64() Guardian function and
fopen64_guardian() function.
The mode parameter controls the access allowed to the stream. It can have one of these values:
r Open an existing text le for read-only access.
w Create a text le (or truncate an existing text le to length zero) and open it for
write-only access.
527192-007 Hewlett-Packard Company 231