On Wed, Jan 23, 2002 at 11:04:44AM -0600, William A. Rowe, Jr. wrote: > This code below is buggy on LARGEFILE platforms, since the apr_off_t tmp > brigade length may not fit in memory (the apr_size_t actual.)
Ah, yes, my bad. I forgot that brigades are apr_off_t-based and buckets are apr_size_t based. How about making buckets apr_off_t based instead? What's the rationale behind having buckets being apr_size_t? (BTW, what LARGEFILE platforms are there?) > This is actually really crufty - since this code needs to deal with -1 > length buckets - they are read [seperately] to resolve the length and > then recopied into the flatten bucket [from zero copy to three copy > in 10e-6 seconds]. Actually that's an assumption that apr_brigade_length > still does so, I'm not certain. If not, I presume apr_brigade_length > may have returned -1. Nah, it doesn't need to deal with -1 length buckets. apr_brigade_length with "read_all" set to 1 will exhaust all buckets to get the true length. > And I'm really uncomfortable about 'adding' null terminators. But that's > a different point. Do you want to return a size instead? We could do that. -- justin
