In article <7ko6mg$66b$1@eskinews.eskimo.com>
scs@eskimo.com "Steve Summit" writes:
> ...But you're right, SEEK_END is still a kicker.
Assuming that it is a real problem (like whether the possibility of UCHAR_MAX > INT_MAX is a real problem). My guess would be that any platform that is capable of determining a precise file size will get SEEK_END right on a binary stream. If you're worried state the assumption in the program documentation but don't lose sleep over it.
There are still good reasons not to get a file size e.g.
If however you really do need to find the size of a file (you know to be a regular file) without actually scanning it end to end there is no more portable way than to use fseek/SEEK_END/ftell on a binary stream.
-- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------