Mail Archives: djgpp/2010/02/23/04:16:02
Rugxulo escribió:
> Hi,
>
> On Feb 21, 6:51 pm, nob DOT DOT DOT AT xmission DOT com (Scott) wrote:
>> Using DJGPP (2.03, GCC 3.3.3 dated 16-Feb-2004, LIBC dated 24-Dec-2001) in a
>> WinXP command shell.
>>
>> Trying to fopen a large (8Gb) file in "rb" mode, I get a fail with EACCES,
>> although perms are OK and no locks exist. Is this expected behavior with
>> large files? I know I'm overstepping the limits of an MSDOS program, but I
>> figured that I would at least be able to read the file serially, since it
>> was *created* with a DJGPP program using fopen/fwrite.
>
> I have no experience with large files since I tend to avoid them. In
> lieu of a response from CWS (so far), I'll just say that he has
> claimed before that 2.04 beta has "better 4 GB file support". So try
> that. ;-)
I've not worked with very large files with DJGPP, but I've experienced
related problems in another context (Cygwin). There is a potential
overflow if byte counts (file length, offset, ...) are stored in 32 bit
variables. The absolute limits are:
- signed values : 2^31-1 = 2147483647 Bytes ~= 2.15 GB
- unsigned values: 2^32-1 = 4294967295 Bytes ~= 4.29 GB
Just a thought.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
- Raw text -