Date: Wed, 08 Aug 2001 22:17:21 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: eggert AT twinsun DOT com Message-Id: <7458-Wed08Aug2001221720+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: rich AT phekda DOT freeserve DOT co DOT uk, djgpp-workers AT delorie DOT com In-reply-to: <200108081737.f78HbTf00873@shade.twinsun.com> (message from Paul Eggert on Wed, 8 Aug 2001 10:37:29 -0700 (PDT)) Subject: Re: GNU ls bug on DJGPP with large files References: <200108081737 DOT f78HbTf00873 AT shade DOT twinsun DOT com> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Wed, 8 Aug 2001 10:37:29 -0700 (PDT) > From: Paul Eggert > > OK, but in the short term if DJGPP cannot support large files, then it > should say so honestly. DJGPP doesn't claim support for large files. It doesn't define any of the macros that are commonly used to test for such support. > For example, its emulation of the 'stat' > system call should return -1 on files larger than 2GB, and should set > errno to EOVERFLOW in that case. Why? `stat' does support files up to 4GB - 2bytes; it has no reason to fail. > That is what POSIX 1003.1-200x draft > 7 requires, and it is what GNU applications expect. Similarly for > 'fstat', 'lseek', 'read', and any other system call that deals with or > modifies file offsets. They all support files larger than 2GB up to the maximum supported by the OS. > In the longer term, though, DJGPP may well not survive if it can't > support files larger than 4 GB. Experience shows that DJGPP users don't care about this much. The latest released version doesn't even support more than 2GB (the support for FAT32 volumes where it's possible to have files as large as 4GB - 2 only exists in the development sources), and no one has ever complained. > I realize that it will be a hassle to > fix the problem, and I also realize that I'm no expert in fixing it: > all I'm saying is that it is a real problem that will get worse with > time. We are talking about a limitation of the underlying OS. Until that is fixed (by Microsoft), DJGPP cannot do anything reasonable with that; we cannot even know that a file is larger than 4GB because (1) such files simply cannot exist on Windows, and (2) there's no system call which can return the information about such large files, even if they existed. In other words, it's a Windows problem, not a DJGPP problem. > We cannot go through every application fixing it to support > nonstandard implementations like this. ``We'' already do. DJGPP ports have many changes, and quite a few ports are not rolled back into the official distributions, for various reasons. Fileutils is one of them; Tar is (unfortunately) another.