http://d.puremagic.com/issues/show_bug.cgi?id=3409

           Summary: stdio.File.seek() doesn't work for files >2GB
           Product: D
           Version: 2.035
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: patch
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2009-10-16 23:01:40 PDT ---
stdio.File.seek() doesn't work for large files.  This is because fseek() is
using an int to represent the offset because it's crufty old C code from the
Stone Age.  Instead, it throws a ConvOverflowError exception on trying to seek
a long distance (> int.max).  The proper fix would be to use the C function
that takes a long instead, but this is apparently not available on all
platforms and not part of the C standard.  

I've attached a file with an implementation of a kludge to work around this
issue by seeking incrementally.  It's ugly but it works.  It's implemented in
terms of the current seek() implementation, and I haven't integrated it into
the File struct, but the basic code is there.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to