lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] File size limitation problem.


From: David Woolley
Subject: Re: [Lynx-dev] File size limitation problem.
Date: Fri, 14 Jan 2005 07:31:09 +0000 (GMT)

> Lynx died with the error "File size limit exceeded" after transferring 
> 1.9999 GB of the file.

Most operating systems have a file size limit of 2GB.  That's certainly
true of the Linux versions that I have used.  It comes from using
signed integers for the lseek function, etc.

Nowadays, they often have a special mode in which file positions are given
in blocks, rather than bytes, but that requires special I/O systems calls
and typically requires the use of the basic system calls rather than the
system independent library routines that are specified in the C standards
(Unix manual section 2 rather 3), because the library routines need to
track the file position.

Anyone providing files for download that are larger than 2GB is inviting
problems.

On Linux, one would have to use the following option on open:

       O_LARGEFILE
              On 32-bit systems that support the Large Files Sys-
              tem,  allow files whose sizes cannot be represented
              in 31 bits to be opened.

I've not checked whether this is supported for fopen and what other
implications it has.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]