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

fseeko64(3) Guardian Native C Library Calls Reference Manual
If the most recent operation (ignoring any ftell() operations) on a given stream was fush(), then
the fseeko64() function causes the le offset in the underlying open le descriptor to be adjusted
to reect the location specied by the fseeko64() function.
The fseeko64() function allows the le-position indicator to be set beyond the end of existing
data in the le. If data is later written at this point, subsequent reads of data in the gap will return
bytes with the value 0 (zero) until data is actually written into the gap. The fseeko64() function
does not, by itself, extend the size of a le.
Information About Guardian EDIT Files
If called from a native process, the fseeko64() function can operate on Guardian EDIT les (type
101 les). The behavior of this function differs according to whether the le is opened with a
Guardian connection or with an OSS connection.
To operate on a Guardian EDIT le using a Guardian connection to that le, you must open a
stream by calling:
fopen_guardian(), freopen_guardian(), or a similar function from any process
fopen( ), freopen(), or a similar function from a process executing in the Guardian
environment
When the stream references a Guardian EDIT le using a Guardian connection, a call to the
fseeko64() function implements a position operation as if an equivalent call were being made to
the edfseeko64() function.
To operate on a Guardian EDIT le using an OSS connection, you must open a stream by calling:
fopen_oss(), freopen_oss(), or a similar function from any process
fopen( ), freopen(), or a similar function from a process executing in the OSS environ-
ment
When the stream references a Guardian EDIT le using an OSS connection, calls to the
fseeko64() function are implemented using the lseek() function. For information about the
lseek() function, see the lseek(2) reference page.
RETURN VALUES
Upon successful completion, the fseeko64() function returns a value of 0 (zero). If the
fseeko64() function fails, a value of -1 is returned, and errno is set to indicate the error.
ERRORS
The fseeko64() function fails if either the stream is unbuffered, or the streams buffer needed to
be ushed and the call to fseeko64() caused an underlying lseek() or write() function to be
invoked. In addition, if any of these conditions occurs, the fseeko64() function sets errno to the
corresponding value.
[EAGAIN] The O_NONBLOCK ag is set for the le descriptor underlying the stream
parameter, and the process is delayed in the write operation.
[EBADF] The le descriptor underlying the stream parameter is not a valid le descriptor
open for writing.
[EFBIG] The buffers of the stream need to be ushed, and the starting point is greater than
or equal to the le offset maximum.
2102 Hewlett-Packard Company 527192-007