trouble with files bigger than 4GB

Daniel Solaz ds.erl@REDACTED
Wed Apr 16 21:11:41 CEST 2003

hi, anyone out there trying to deal with large files?

when given a file that is 4294967297 bytes (4GB + 1 byte) long, 
file:read_file_info() incorrectly reports a file size of 1 byte

file:position(F, {eof, 0}) returns {ok, 1}

files bigger than 2GB but smaller than 4GB work fine

I'm using R9B-1 on FreeBSD 4.6 for intel

on Solaris 8 for intel, R9B-1 refuses to file:read_file_info() or 
file:open() the file, returning {error, unknown}, and I actually prefer 
this behavior

this difference might (or might not) be due to Solaris requiring 
fopen64() for large file operations, whereas FreeBSD just uses fopen()

is this a known bug?


More information about the erlang-questions mailing list