Can we be sure that INT_MAX == 2GB ? What about I64 platforms like
Alpha?
On Thu, May 04, 2006 at 04:17:36PM -0000, [EMAIL PROTECTED] wrote:
> ==============================================================================
> --- apr/apr/trunk/network_io/unix/sendrecv.c (original)
> +++ apr/apr/trunk/network_io/unix/sendrecv.c Thu May 4 09:17:36 2006
> @@ -269,6 +269,14 @@
>
> #else
> off_t off = *offset;
> +
> + /* Multiple reports have shown sendfile failing with EINVAL if
> + * passed a >=2Gb count value on some 64-bit kernels. It won't
> + * noticably hurt performance to limit each call to <2Gb at a
> + * time, so avoid that issue here: */
> + if (sizeof(off_t) == 8 && *len > INT_MAX) {
> + *len = INT_MAX;
> + }
> #endif
>
> if (!hdtr) {
>
>
>
--
Colm MacCárthaigh Public Key: [EMAIL PROTECTED]