Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (f) freopen64_guardian(3)
NAME
freopen64_guardian - Opens a stream (Guardian freopen64( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdio.h>
FILE ∗∗freopen64(
const char ∗∗filename,
const char ∗∗mode,
FILE ∗∗stream);
FILE ∗∗freopen64_guardian(
const char ∗∗filename,
const char ∗∗mode,
FILE ∗∗stream);
PARAMETERS
filename Points to a character string that contains the name of the file to be opened. To
include a node name in the filename, 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 file is opened for reading
(r), writing (w), or appending (a) and whether the file is opened for updating (+).
The character string also controls whether the file is a text file (default) or a
binary file (b).
stream Specifies the input stream.
DESCRIPTION
This function is similar to the freopen_guardian() function except that, in addition to supporting
smaller files, the freopen64_guardian() function supports Guardian files that have an offset
maximum larger than 4 gigabytes (Guardian Format 2 files).
An application can explicitly call this function when you compile the application using the
#define _LARGEFILE64_SOURCE 1 feature test macro or an equivalent compiler command
option.
An application call to freopen64_guardian() is automatically mapped to this function when you
compile the application using the #define _FILE_OFFSET_BITS 64 feature test macro or an
equivalent compiler command option.
The freopen64() Guardian function and freopen64_guardian() function substitute the named
file in place of the open stream.
These functions are identical in the Guardian environment. Unless otherwise noted, this refer-
ence page uses freopen64() to refer to both the freopen64() Guardian function and
freopen64_guardian() function.
The freopen64() function returns a pointer to the FILE structure associated with the stream
parameter. The freopen64() function is typically used to attach the preopened streams associated
with stdin, stdout, and stderr to other files.
The mode parameter controls the access allowed to the stream. It can have one of these values:
527192-018 Hewlett-Packard Company 2−111