trouble with files bigger than 4GB

Daniel Solaz ds.erl@REDACTED
Wed Apr 23 22:18:49 CEST 2003

On Tuesday 22 April 2003 09:34 Raimo Niskanen wrote:

> Daniel Solaz wrote:
> > Yes, this is described in the lfcompile(5) man page.
> > I'll try to hack the appropriate Makefile(s) and recompile so I can
> > check whether this is enough to get the code working, where working
> > means "like in FreeBSD".

> Well, I will fix the simple bug i mentioned above, but if off_t is 4
> bytes, there is not much to do on such a system. There is no high
> word to make use of. File size (or absolute position) 4294967296 is
> indistinguishable from 0. Absolute position 4294967295 is the same as
> error return value -1 from lseek().

Great,  FreeBSD issue solved.  Thanks.

On 32bit Solaris, adding -D_FILE_OFFSET_BITS=64 to the cc call does the 
trick: off_t becomes 8 bytes long, fopen() means fopen64(), etc.  
However, according to the docs, this does interact badly with some 
other OS subsystems.

So I'd like to try this first and report whether things work, or at 
least seem to.  But I lack the expertise required to hack configure so 
that it compiles the off_t size test with -D_FILE_OFFSET_BITS=64 and 
generates new Makefiles with -D_FILE_OFFSET_BITS=64 in them.  Can 
anyone give me a pointer?


More information about the erlang-questions mailing list