A.J.Mechelynck wrote:

I'm not sure what varnumber_T means: will st.stsize (the dividend) be wide enough to avoid losing bits on the left?

varnumber_T is int (long if an sizeof(int) <= 3).

st.stsize 's size depends on whether 32bit or 64bit integers are available.

So, its possible to lose bits: pick a small enough unitsize and a large enough file, st.stsize will end up not being able to fit into a varnumber_T. After all, unitsize could be 1, and getfsize() will behave no differently than it does now. However, unitsize could be 1000000. My patch divides st.stsize by the unitsize first; presumably in whatever
arithmetic is appropriate for working with st.stsize.

Regards,
Chip Campbell

Reply via email to