[flac-dev] Bug fix and compatibility patches for 1.3.0pre4

Timothy B. Terriberry tterribe at xiph.org
Sun May 5 08:02:55 PDT 2013


JonY wrote:
> How about just forgetting about base XP and require at least SP2 or some
> such? Alternatively, use win32api underneath instead, eg
> CreateFileW/SetFilePointer.

This requires replacing _all_ of the FILE I/O, not just these two 
functions, which is a lot more work to no clear advantage. The _lseeki64 
implementation uses SetFilePointer internally, but doing that directly 
without changing everything else has the same problems using _lseeki64 does.

> Bad, do no declare manually, I had to cleanup some bad code recently
> that make assumptions about your header declarations. You can try using

Windows headers are usually well-defined enough that you can get away 
with it (upgrade cycles are slow and changes would break lots of 
systems, so things don't change). But according to some random page on 
the internet, this function is not exposed in the msvcrt.dll distributed 
with XP. So this wouldn't work anyway.

Instead I've attached a patch that uses fgetpos/fsetpos. This is totally 
untested (I haven't even checked it compiles), but the idea should work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-fgetpos-fsetpos-for-64-bit-win32-fseek-ftell.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20130505/5bbec174/attachment.bin 


More information about the flac-dev mailing list