Send MinGW-Notify mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osdn.me/mailman/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-Notify digest..."


Please do not reply to this notification; the sender address is unable to 
accept incoming e-mail.  If you wish to unsubscribe you can do so at 
https://lists.osdn.me/mailman/listinfo/mingw-notify.



Today's Topics:

   1. [mingw] #38225: Emulate _fseeki64()/_ftelli64() API on legacy
      platforms. (MinGW Notification List)


----------------------------------------------------------------------

Message: 1
Date: Tue, 09 Oct 2018 22:04:47 +0100
From: MinGW Notification List <[email protected]>
Subject: [MinGW-Notify] [mingw] #38225: Emulate
        _fseeki64()/_ftelli64() API on legacy platforms.
To: OSDN Ticket System <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

#38225: Emulate _fseeki64()/_ftelli64() API on legacy platforms.

  Open Date: 2018-04-21 15:26
Last Update: 2018-10-09 22:04

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/38225
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38225

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2018-10-09 22:04 Updated by: keith

Comment:

Reply To earnie

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

It always has been possible to do so, to the extent that _lseeki64() supports
it; the problem is that the effect of _lseeki64() isn't reflected in __iob
context, without some additional processing.

The patch I've proposed provides fall-back implementations of _fseeki64() and
_ftelli64(), based on _lseeki64() and _telli64() respectively, with the
additional processing required to propagate relevant effects to the associated
__iob context. Unfortunately, while these fall-back implementations should be
entirely suitable for deployment on all WinNT derived platforms, they are
likely to be susceptible to the "write after seek beyond EOF" issue described
in Mumit Khan's mingw-fseek.c, when deployed on Win9x; however, I do have
reservations about the robustness of Mumit's work-around for this issue, which
may thus benefit from review, and some rework.



---------------------------------------------------------------------
Ticket Status:

      Reporter: keith
         Owner: (None)
          Type: Feature Request
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket 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.



-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/38225
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=38225


------------------------------

_______________________________________________
MinGW-Notify mailing list
[email protected]
https://lists.osdn.me/mailman/listinfo/mingw-notify


End of MinGW-Notify Digest, Vol 13, Issue 2
*******************************************

Reply via email to