--- server/core.c.orig 2004-04-02 21:37:03.000000000 +0100 +++ server/core.c 2004-05-16 19:58:43.000000000 +0100 @@ -3487,17 +3487,11 @@ } bb = apr_brigade_create(r->pool, c->bucket_alloc); -#if APR_HAS_LARGE_FILES -#if APR_HAS_SENDFILE - if ((d->enable_sendfile != ENABLE_SENDFILE_OFF) && -#else - if ( -#endif - (r->finfo.size > AP_MAX_SENDFILE)) { - /* APR_HAS_LARGE_FILES issue; must split into mutiple buckets, - * no greater than MAX(apr_size_t), and more granular than that - * in case the brigade code/filters attempt to read it directly. - */ + if (sizeof(apr_off_t) > sizeof(apr_size_t) + && r->finfo.size > AP_MAX_SENDFILE) { + /* Must split into mutiple buckets, no greater than + * MAX(apr_size_t), and more granular than that in case + * the brigade code/filters attempt to read it directly. */ apr_off_t fsize = r->finfo.size; e = apr_bucket_file_create(fd, 0, AP_MAX_SENDFILE, r->pool, c->bucket_alloc); @@ -3511,7 +3505,6 @@ e->length = (apr_size_t)fsize; /* Resize just the last bucket */ } else -#endif e = apr_bucket_file_create(fd, 0, (apr_size_t)r->finfo.size, r->pool, c->bucket_alloc);