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

Guardian Native C Library Calls (f) fgetpos64(3)
NAME
fgetpos64 - Repositions the le pointer of a stream
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>
int fgetpos64(
FILE *stream,
fpos64_t *position);
PARAMETERS
stream Species the I/O stream.
position Species the value of the le position indicator.
DESCRIPTION
The fgetpos64() function is similar to the fgetpos( ) function except that, in addition to support-
ing smaller les, the fgetpos64() function supports OSS les larger than approximately 2 giga-
bytes and Guardian les larger than approximatly 4 gigabytes.
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 fgetpos() is automatically mapped to this function when you compile the
application using the #dene _FILE_OFFSET_BITS 64 feature test macro or an equivalent
compiler command option.
The fgetpos64() function is similar to the fseek() function. The fgetpos64() function stores the
current value of the le position indicator for the stream pointed to by the stream parameter in
the object pointed to by the position parameter. The fsetpos( ) function sets the le position indi-
cator according to the value of the position parameter, returned by a prior call to the fgetpos64()
function.
RETURN VALUES
Upon successful completion, the fgetpos64() function returns a value of 0 (zero). If the fget-
pos64() function fails, a value of -1 is returned, and errno is set to [EINVAL].
ERRORS
If any of these conditions occurs, the fgetpos64() sets errno to the corresponding value:
[EBADF] The le descriptor underlying the stream parameter is not a valid le descriptor.
[EFBIG] The buffers of the stream need to be ushed and the starting point is greater than
or equal to the le offset maximum.
[EOVERFLOW]
The value of the le position is greater than or equal to the le offset maximum.
[ESPIPE] An illegal attempt was made to get or set the le position of a pipe or FIFO.
527192-007 Hewlett-Packard Company 217