[erlang-questions] efile_drv.c bug?

Raimo Niskanen <>
Tue Jun 17 12:16:52 CEST 2008


On Mon, Jun 16, 2008 at 01:10:15PM -0700, Darren New wrote:
> Not that I'm following the 15-line macro EV_GET_UINT64, but just looking
> at it, it looks like it has two shifts by 56 bits and no shift by 48
> bits. I suspect the second shift by 56 bits should be a 48 instead.

Oh yes, well spotted! It will be corrected.


> 
> (Offhand, I wonder what sort of testing would have caught that?)

I suppose you noticed that macro is not used, so there is even
a question if it was a real bug or not...

> 
> Any idea why Windows (XP/SP2/32bit) can't handle files >4G but Linux can 
> with the same release? Is this something expected to get fixed eventually?

If I recall correctly, file pointers (off_t) are signed in Windows
but there are extensions in Unix that use unsigned off_t but
((off_t) -1) as an error return value, so it is possible on
many 32 bit Unixes to have almost 4GByte files, but 32 bit
Windows is stuck with its 2GByte limit.

Someone correct me!?

> 
> -- 
> Darren New / San Diego, CA, USA (PST)
>   Helpful housekeeping hints:
>    Check your feather pillows for holes
>     before putting them in the washing machine.
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list