X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Manuel Collado Newsgroups: comp.os.msdos.djgpp Subject: Re: Open large file gives EACCES Date: Tue, 23 Feb 2010 10:03:23 +0100 Organization: RedIRIS Lines: 29 Message-ID: References: <4b81d0d6 DOT 370946015 AT localhost> <4423b907-7958-4aca-94f7-6c9939782cea AT g26g2000yqn DOT googlegroups DOT com> NNTP-Posting-Host: sri161.sri.fi.upm.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: heraldo.rediris.es 1266916102 19191 138.100.242.161 (23 Feb 2010 09:08:22 GMT) X-Complaints-To: jesus DOT heras AT rediris DOT es NNTP-Posting-Date: Tue, 23 Feb 2010 09:08:22 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <4423b907-7958-4aca-94f7-6c9939782cea@g26g2000yqn.googlegroups.com> Bytes: 2252 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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