From: matthew green <mrg(_at_)mame(_dot_)mu(_dot_)oz(_dot_)au>
There were several fixes submitted for this. How are
fseek() and ftell() defined on 64bit systems? On my
Solaris 2.4 system, the offset in fseek and the return
value of ftell are of type "long".
i think that fseek and ftell are defined to have the offset of type
long -- which is 64 bits on all the 64 bit OS's i know (convexos,
osf/1 and netbsd/alpha).
The problem is more complicated that 32 vs 64 bits in
international environments. The values returned from fseek()
and ftell() on text files are cookies that may have no bearing
whatsoever on the current file position:
For a text stream, its file position indicator contains
unspecified information usable by the fseek function
for returning the file position ... to its position at
the time of the ftell call; the difference between two
such return values is not necessarily a meaningful
indication of the number of characters read or written.
I personally am aware of a (very nonportable) implementation of
ftell that mallocs a chunk of state information and returns the
pointer to the state as the ftell result.
- David