Re: [hatari-devel] Using ftello/fseeko instead of ftell/fseek for large file support

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


On Mittwoch, 23. August 2017 14:56:27 CEST Nicolas Pomarède wrote:
> Shouldn't we use fseeko/ftello which uses a "off_t" type and can handle
> 64 bit file size, instead of the older fseek/ftell which can be limited
> to 32 bits / 2 GB ?

You usually only need that on 32bit hosts. On 64-bit hosts, the default 
interface already uses long. which should be 64bit (unless for braindamaged 
win32, but things are there  different anyway). Also, even for 32-bit hosts, 
you usually can enforce the interface to use 64bit file pointers by using 
_LARGEFILE_SOURCE and _FILEOFFSET_BITS=64 without having to change your code.

Beside that, it is really only important for things like you mentioned 
(accessing the recorded avi file). For the gemdos emulation, it is irrelevant, 
since neither mint nor TOS can handle 64bit file offsets.




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