The fgetpos() and fsetpos() functions are alternate interfaces equiva�
lent to ftell() and fseek() (with whence set to SEEK_SET), setting and
storing the current value of the file offset into or from the object
referenced by pos. On some non-UNIX systems, an fpos_t object may be a
complex object and these routines may be the only way to portably repo�
sition a text stream.
So you are playing with fire by assuming that fpos_t is an integer.