Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

fsetpos64(3) OSS Library Calls Reference Manual
NAME
fsetpos64 - Repositions the file pointer of a stream
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>
int fsetpos64(
FILE *stream,
const fpos64_t *position);
PARAMETERS
stream Specifies the I/O stream.
position Specifies the value of the file position indicator.
DESCRIPTION
The fsetpos64( ) function is similar to the fsetpos( ) function except that, in addition to support-
ing smaller files, the fsetpos64( ) function supports OSS files larger than approximately 2 giga-
bytes and Guardian files larger than approximately 4 gigabytes.
The fsetpos64( ) function is similar to the ftello64( ) function. The fsetpos64( ) function sets the
file position indicator according to the value of the position parameter, returned by a prior call to
the fgetpos64( ) function.
A successful call to the fsetpos64( ) function clears the End-of-File indicator and undoes any
effects of the ungetc() function.
RETURN VALUES
Upon successful completion, the fsetpos64( ) function returns a value of 0 (zero). If the fset-
pos64( ) function fails, a value of -1 is returned, and errno is set to [EINVAL].
ERRORS
If these conditions occurs, the fsetpos64( ) function sets errno to the corresponding value:
[EBADF] The file descriptor underlying the stream parameter is not a valid file descriptor.
[EFBIG] The buffers of the stream need to be flushed, and the starting point is greater than
or equal to the file offset maximum established when the file was opened.
[EOVERFLOW]
The value of the file position is greater than or equal to the file offset maximum.
[ESPIPE] An illegal attempt was made to get or set the file position of a pipe or FIFO.
RELATED INFORMATION
Functions: fgetpos(3), fopen(3), fopen64(3), fseek(3), ftell(3), rewind(3).
STANDARDS CONFORMANCE
This function is an HP extension to the XPG4 Version 2 specification.
2188 Hewlett-Packard Company 527187-017