On 21.07.2020 17:19, Liu Hao wrote:
在 2020/7/21 23:07, Jacek Caban 写道:
Sorry for joining the discussion late. How about implementing them directly on
top of msvcrt functions? Would something like:
return _telli64(_fileno(stream));
be enough for _ftelli64? Similarly:
return _lseeki64(_fileno(stream), offset, origin);
for fseeki64?
`FILE` objects provide their own buffering, so calling `_telli64()` without
flushing internal buffers might lead to
incorrect results.
`fseeko64()` calls `fsetpos()` in reality.
Oh, right. The problem with fsetpos is that the way fseeko is
implemented is not thread safe, but maybe it's not too bad.
fseeko64 is not really long (the file looks more complicated than it is
because of an unused mingw_dosmaperr function there...) maybe we could
just duplicate that code for fseeko.
Thanks,
Jacek
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public