Re: [AD] bugfix for files > 2GB under unix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, 2006-05-17 at 17:36 +0200, Elias Pschernig wrote:
> On Tue, 2006-05-16 at 14:56 +0200, Elias Pschernig wrote:
> >
> > Actually, providing wrong file sizes looks really broken, so here's now
> > a proper patch. To work around binary compatibility, I sneaked in an
> > extra size field into an internal struct, and provided an accessor
> > function. For file size, there's simply "uint64_t file_size_ex" now.
>
> Here is the complete patch, ready to be applied. Everything is
> documented, file_size is deprecated, the 32-bit "size" field of al_ffblk
> is no longer documented, and all examples/tools are updated accordingly.
>
> So, Allegro 4.2.1 will be able to list all files up to about 10
> ExaByte :)
Applied it now, with minor changes.
32-bit types simply aren't enough to hold the size of a file in bytes,
so there was no way around deprecating the existing function/struct
access. In case the deprecating influences ABI compatibility, it has to
be reverted though (but i assume it's only a compile time marking, so it
should not).
If someone knows how to get correct file sizes in Windows and OSX ports,
those could be updated as well now. I also had no way to test this under
any other ports - in particular, I'm not sure if uint64_t is properly
defined everywhere.
--
Elias Pschernig