Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I see:
> The fseeko() function is identical to fseek(), except it takes an off_t
> argument instead of a long. Likewise, the ftello() function is identical
> to ftell(), except it returns an off_t.
Indeed. Notice the complete lack of any commitment about the size of
off_t ...
> while fsetpos() is:
> fsetpos(FILE *stream, const fpos_t *pos);
... or the size of fpos_t.
You might find it illuminating to read this random extract from the
HPUX 10.20 man pages:
NAME fgetpos64(), fopen64(), freopen64(), fseeko64(), fsetpos64(), fstatvfsdev64(), ftello64(), ftw64(),
nftw64(),statvfsdev64(), tmpfile64() - non-POSIX standard API interfaces to support large files.
DESCRIPTION New API's to support large files. These API interfaces are not a part of the POSIX standard and may
beremoved in the future.
fgetpos64() The fgetpos64() function is identical to fgetpos() except that
fgetpos64()returns the position in a fpos64_t instead of a fpos_t. All
other functional behaviors, returns, and errors are identical.
... etc ...
I don't see any reason to believe that fgetpos buys us anything but
notational inconvenience. It certainly doesn't buy large file support,
at least not without the same behind-the-scenes redefinitions needed for
fseek/fseeko and friends...
regards, tom lane