On Wed, Apr 28, 2004 at 05:03:14PM -0700, Mathihalli, Madhusudan wrote: > Hello, > On my HP-UX 11i box (64-bit os), if I build a 32-bit app > (default), the apr_off_t is a 4-byte entity and apr_int64_t is a > 8-byte entity. I'm sure more than one person has experienced > something similar. > > This is the part that I don't understand : In http_protocol.c: > parse_byterange(), the return value of apr_atoi64 is being > assigned to apr_off_t - what's the point of doing something like > that ? Can I change range_start and range_end to apr_int64_t ?
apr_off_t is the right type to use since these are file offsets. parse_byterange should probably check for integer overflow when sizeof(apr_off_t) != sizeof(apr_int64_t), but if you have a >2gb file and a 32-bit apr_off_t, you're stuck anyway. Regards, joe