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
]
Thorsten Otto schrieb:
> 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).
Well, "braindamaged win32" is a supported platform for Hatari, so one
should not disregard it but write the code accordingly.
> 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.
But that's only true *if* you use fseeko and ftello. fseek and ftell
will always have to use signed long int to be compliant to the C
standard. Hence, on a 32-bit host, be it Linux/Unix or Windows, you will
be restricted to 2 GB when using fseek and ftell. No macro can change this.
@Nicolas: I agree that Hatari should consistenly use fseeko and ftello.
Regards
Christian
--
Christian Zietz - CHZ-Soft - czietz@xxxxxxx
WWW: http://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA