any update on large file support for linux?

Lars Holowko lars.holowko at gmail.com
Tue Sep 7 09:05:29 PDT 2010


On Tue, Sep 7, 2010 at 1:08 AM, Lars T. Kyllingstad
<public at kyllingen.nospamnet> wrote:
> The SVN version of std.stdio supports large files on Linux and OSX.  The
> next release will be a nice one, I think. :)
>
> -Lars
>

Thanks Lars,

For the hint to the svn versions. Things seem to work there. What
really surprised me is that dmd compiles

 f.seek(1024 * 1024 * 1024 * 6, SEEK_SET);

but fails with

std.exception.ErrnoException at std/stdio.d(538): Could not seek in file
`test.txt' (Invalid argument)

whereas

 f.seek(1024 * 1024 * 1024 * 6L, SEEK_SET);

works fine.

I did not realize that 1024 * 1024 * 1024 * 6 turns negative and then
gets converted to a negative long (without even a warning). Overseeing
that had killed my own efforts to hack 64-bit support into phobos ;-)

Thanks again,

(another ;-)) Lars


More information about the Digitalmars-d mailing list