[GRASS-dev] fseeko() in libiostream

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Oct 7 19:15:08 EDT 2008


On Tue, 7 Oct 2008, Glynn Clements wrote:

>
> Paul Kelly wrote:
>
>> +#ifdef HAVE_LARGEFILES
>> +       filesize = ftello(in_fp);
>> +#else
>>          filesize = ftell(in_fp);
>> +#endif
>
> Can we add library functions, G_fseek() and G_ftell(), which use an
> off_t. The functions would use fseeko/ftello if available, fseek/ftell
> otherwise, but would always accept and return off_t.

But isn't off_t not always the same size - IIUC it depends on whether 
_FILE_OFFSET_BITS is defined and what it is set to? Should there be a 
typedef FILE_OFFSET which is equivalent to the "correct" off_t, or 
something similar?


More information about the grass-dev mailing list