D
David Mathog
I recently ran into a problem where a data file downloaded
from another site contained more than 4Gb of data and so
the index file to items within that data went from unsigned
4 byte integers to unsigned 8 byte integers. Naturally this
broke my code which uses fseek(), and can only offset by
longs, which on the target OS is a 4 byte integer.
There are ways around this using OS calls, but
as far as I can tell the C99 standard offers no way to write
code that can jump to an arbitrary offset in this type of
large data file. Is there any movement in the standards
community towards solving this problem in the not too
distant future?
Solaris offers fseeko (fseek with offset of type
off_t) and various other lf64 extensions, but the man pages
didn't indicate that it was anything other than a Sun
specific solution.
Thanks,
David Mathog
(e-mail address removed)
from another site contained more than 4Gb of data and so
the index file to items within that data went from unsigned
4 byte integers to unsigned 8 byte integers. Naturally this
broke my code which uses fseek(), and can only offset by
longs, which on the target OS is a 4 byte integer.
There are ways around this using OS calls, but
as far as I can tell the C99 standard offers no way to write
code that can jump to an arbitrary offset in this type of
large data file. Is there any movement in the standards
community towards solving this problem in the not too
distant future?
Solaris offers fseeko (fseek with offset of type
off_t) and various other lf64 extensions, but the man pages
didn't indicate that it was anything other than a Sun
specific solution.
Thanks,
David Mathog
(e-mail address removed)