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

fopen64_std_le(3) Guardian Native C Library Calls Reference Manual
NAME
fopen64_std_le - Opens standard input, standard output, or standard error le
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>
short fopen64_std_le (
short le
[,short die_on_error]
);
PARAMETERS
file Species which standard le to open: 0 indicates standard input, 1 indicates
standard output, and 2 indicates standard error.
die_on_error Indicates what occurs if there is an error when attempting to open the le. If
die_on_error is a nonzero value and an open error occurs, normal process shut-
down sequence runs, which includes writing a standard message and calling the
Guardian system procedure PROCESS_STOP_. If die_on_error parameter is
omitted or is zero, the function returns to the calling function on an error.
DESCRIPTION
The fopen64_std_le() function is similar to the open_std_le() function except that, in addi-
tion to supporting smaller les, the open64_std_le() function supports OSS les that have a le
offset maximum larger than 2 gigabytes and Guardian les that have a le offset maximum 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_std_le() is automatically mapped to this function when you com-
pile the application using the #dene _FILE_OFFSET_BITS 64 feature test macro or an
equivalent compiler command option.
The fopen64_std_le() function opens the specied standard input, standard output, or standard
error le. This function is used if the standard le was not opened automatically because the
NOSTDFILES pragma was specied or because the main function was not written in the C
language.
You can call the fopen64_std_le() function in Guardian modules (modules compiled for the
Guardian environment) within Guardian processes only.
RETURN VALUES
Upon successful completion, the value 0 (zero) is returned. Otherwise, fopen64_std_le()
returns 1 if the le is already open, -1 if there is a problem with a parameter, and -2 if the open
failed. The -2 is not returned if a nonzero value was passed for the die_on_error parameter.
RELATED INFORMATION
Functions: fopen64(3).
238 Hewlett-Packard Company 527192-007