Date: Tue, 7 Aug 2001 10:53:24 -0700 (PDT) From: Paul Eggert Message-Id: <200108071753.f77HrOI08852@shade.twinsun.com> To: rich AT phekda DOT freeserve DOT co DOT uk CC: jim AT meyering DOT net, djgpp-workers AT delorie DOT com In-reply-to: <3B6EF0F4.42881D93@phekda.freeserve.co.uk> (rich AT phekda DOT freeserve DOT co DOT uk) Subject: GNU ls bug on DJGPP with large files References: <3B6D3C6C DOT 6A55EEEF AT phekda DOT freeserve DOT co DOT uk> <3B6EF0F4 DOT 42881D93 AT phekda DOT freeserve DOT co DOT uk> 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: Mon, 06 Aug 2001 20:33:08 +0100 > From: Richard Dawe > > An alternative suggestion on the djgpp-workers list was to change off_t to > be of type (signed) long long. Since DJGPP 2.04 will support the extra > features FAT32 supports on Windows (>2GB files), this change could be > considered part of the FAT32 support. Unfortunately this change would > break binary compatibility with DJGPP < 2.04 It wouldn't have to break binary compatibility. glibc, Solaris, and other C libraries all support both small-file code (that does not work with >2GB files) and large-file code (that does work). This is typically done with a single C library. The basic idea is that code that wants large files is compiled with an option (typically -D_FILE_OFFSET_BITS=64) that causes it to use 64-bit off_t and to link to a part of the C library that assumes 64-bit off_t. Code that doesn't want to use large files continues to work as-is. Personally I think large-file mode should be the default, and that you should compile with -D_FILE_OFFSET_BITS=32 if you really want your program to be broken, but that's a different issue. Patching GNU 'ls' is a band-aid. The patch will cause GNU 'ls' to do the right thing for files between 2 GB and 4 GB, but files larger than 4 GB will still be mishandled. So DJGPP really needs to get fixed. PS. Sorry if I'm repeating arguments you've already heard. I tried to read the djgpp-workers archive about this at , but the web site was too sluggish to use.