Robert Kausch wrote: > The _lseeki64 patch probably is a little more controversial. The problem > is that fseeki64 and ftelli64 are not available in Windows XP - at least > not without installing extra MSVC runtime libraries. I changed compat.h > and replaced them with calls to _lseeki64, which was available at least > back to Windows 98 and thus doesn't impose such compatibility issues.
_lseeki64 operates on the underlying file handle, and does not interact well with the buffering in stdio streams. I _think_ you can use this successfully if you call fflush() beforehand (as this sets FILE::_cnt to 0 and FILE::_ptr to FILE::_base). By which I mean I read the MSVCRT source from MSVC6.0 and it appears this is how things work. That source also includes an fseeki64()/ftelli64(), but they are not defined in stdio.h. I wonder if just declaring it yourself is good enough? If not, they get called by fsetpos()/fgetpos() (which _do_ interact correctly with the buffering in stdio streams), except when _MAC is defined (which I presume is not common). I don't actually have XP to test against. _______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev