Re: [AD] bugfix for files > 2GB under unix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, 2006-05-21 at 21:26 +0100, Peter Hull wrote:
> > 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.
> uint64_t is defined in stdint.h for OSX.
> 
> OSX doesn't (AFAICS) have stat64, but the file size field of struct
> stat is defined as off_t, which is 64-bit.
> 

Yes, it means, the patch should now enable 64-bit file sizes under OSX:

            info->size = s.st_size; /* overflows at 2GB */
            ff_data->size = s.st_size;

The first line is for backwards compatibility with apps accessing the
->size field, but ff_data->size is int64_t, so under OSX, should get all
64 bit.

That is, assuming OSX uses unix/ufile.c - but since I saw no separate
implementation, I assume it is.

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/