3 <<fsetpos64>>---restore position of a large stream or file
12 int fsetpos64(FILE *<[fp]>, const _fpos64_t *<[pos]>);
13 int _fsetpos64_r(struct _reent *<[ptr]>, FILE *<[fp]>,
14 const _fpos64_t *<[pos]>);
17 Objects of type <<FILE>> can have a ``position'' that records how much
18 of the file your program has already read. Many of the <<stdio>> functions
19 depend on this position, and many change it as a side effect.
21 You can use <<fsetpos64>> to return the large file identified by <[fp]> to a
22 previous position <<*<[pos]>>> (after first recording it with <<fgetpos64>>).
24 See <<fseeko64>> for a similar facility.
27 <<fgetpos64>> returns <<0>> when successful. If <<fgetpos64>> fails, the
28 result is <<1>>. The reason for failure is indicated in <<errno>>:
29 either <<ESPIPE>> (the stream identified by <[fp]> doesn't support
30 64-bit repositioning) or <<EINVAL>> (invalid file position).
33 <<fsetpos64>> is a glibc extension.
35 Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
36 <<lseek64>>, <<read>>, <<sbrk>>, <<write>>.
41 #ifdef __LARGE64_FILES
44 _fsetpos64_r (struct _reent
*ptr
,
46 const _fpos64_t
* pos
)
48 int x
= _fseeko64_r (ptr
, iop
, (_off64_t
)(*pos
), SEEK_SET
);
58 fsetpos64 (FILE * iop
,
59 const _fpos64_t
* pos
)
61 return _fsetpos64_r (_REENT
, iop
, pos
);
64 #endif /* !_REENT_ONLY */
66 #endif /* __LARGE64_FILES */