Mail Archives: djgpp-workers/2001/08/07/13:54:07
> Date: Mon, 06 Aug 2001 20:33:08 +0100
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
>
> 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
<http://www.delorie.com/archives/>, but the web site was too sluggish
to use.
- Raw text -