Ticket #38225

Emulate _fseeki64()/_ftelli64() API on legacy platforms.

Open Date: 2018-04-21 23:26 Last Update: 2018-04-25 01:43

Reporter:
Owner:
(None)
Status:
Open
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
Vote
Score: 2
100.0% (2/2)
0.0% (0/2)

Details

Although 32-bit Windows has supported operations on files larger than 2GB, since at least WinNT4 and Win98, (and possibly earlier), Microsoft did not introduce the _fseeki64() and _ftelli64() APIs until MSVCR80.DLL, (and subsequently retrofitted it to MSVCRT.DLL, from WinVista onwards); prior to this, random access support in large files was provided through lower level APIs such as _lseeki64(), or native Windows API functions.

As noted in this mailing list query, and this subsequent follow-up thread, it is practicable to emulate the _fseeki64() and _ftelli64() APIs, such that they become available on legacy versions of Windows, which pre-date the formal introduction of these APIs by Microsoft; however, previous efforts to do so may not have been entirely robust. Hopefully, the attached patch will do a better job.

Attachment File List

  • emulate-fseeki64.patch(18KB)
    • Patch to implement _fseeki64()/_ftelli64(), and replace fseeko64()/ftello64(), on legacy platforms

Ticket History (3/3 Histories)

2018-04-21 23:26 Updated by: keith
  • New Ticket "Emulate _fseeki64()/_ftelli64() API on legacy platforms." created
2018-04-21 23:29 Updated by: keith
  • File emulate-fseeki64.patch (File ID: 5396) is attached
2018-04-25 01:43 Updated by: earnie
Comment

It would be extremely useful to be able to seek past the 2G limit MS has.

Edit

Please login to add comment to this ticket » Login