std.stdio.File.seek error

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 14 00:15:01 PDT 2016


On Monday, 14 March 2016 at 05:24:48 UTC, stunaep wrote:
> On Monday, 14 March 2016 at 03:07:05 UTC, Nicholas Wilson wrote:
>> [...]
>
> I'm currently on windows 7. The code you gave me prints 022. 
> It's weird because it always tries to convert longs to ints and 
> I think that is weird because the function uses a c_long.
>> [...]
>
> It wont even compile if I try giving it a long
>> [...]
>
> I also tried giving it a c_long, but this line
>>[...]
> gives this error for some reason...
>> [...]
>
> It's like c_longs are not longs at all...

c_long maps to the target long which evidently is not 64-bit on 
win7
meaning you can't seek longer than int.max.
  if you cant't find _fseeki64 try looking in the windows section.
Glad you got it working on arch.

Nic


More information about the Digitalmars-d-learn mailing list