any update on large file support for linux?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Sep 7 09:34:28 PDT 2010


On 9/7/10 11:05 CDT, Lars Holowko wrote:
> 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

Hmmm... the compiler could and should warn about integer overflow in 
computed constant. I suggest you file this as an improvement in bugzilla.

Glad to hear large files are working for you.


Andrei


More information about the Digitalmars-d mailing list