1
--- build-tree/apache2/srclib/apr/include/apr.h.in 2004-02-28 11:41:32.000000000 -0700
2
+++ build-tree/apache2/srclib/apr/include/apr.h.in 2004-08-15 05:45:44.000000000 -0600
4
#define APR_HAS_UNICODE_FS 0
5
#define APR_HAS_PROC_INVOKED 0
7
-#define APR_HAS_LARGE_FILES 0
8
+#define APR_HAS_LARGE_FILES 1
9
#define APR_HAS_XTHREAD_FILES 0
10
#define APR_HAS_OS_UUID 0
12
--- build-tree/apache2/srclib/apr/include/arch/unix/apr_arch_networkio.h 2004-02-13 02:33:47.000000000 -0700
13
+++ build-tree/apache2/srclib/apr/include/arch/unix/apr_arch_networkio.h 2004-08-15 06:58:51.000000000 -0600
17
#if APR_HAVE_SYS_SENDFILE_H
18
+# ifdef __USE_FILE_OFFSET64
19
+#include "apr_sendfile_wrapper.h"
21
#include <sys/sendfile.h>
24
#if APR_HAVE_SYS_IOCTL_H
25
#include <sys/ioctl.h>
27
--- build-tree/apache2/srclib/apr/network_io/unix/sendrecv.c 2004-08-15 06:55:45.000000000 -0600
28
+++ build-tree/apache2/srclib/apr/network_io/unix/sendrecv.c 2004-08-15 07:01:57.000000000 -0600
31
/* This file is needed to allow us access to the apr_file_t internals. */
32
#include "apr_arch_file_io.h"
34
+#ifdef __USE_FILE_OFFSET64
35
+ssize_t apr_sendfile_real (int __out_fd, int __in_fd, __off64_t *__offset, size_t __count)
37
+ apr_off_t off = *__offset;
40
+ result = sendfile64 (__out_fd, __in_fd, &off, __count);
41
+ if ( errno == ENOSYS )
43
+ long off = *__offset;
44
+ result = sendfile (__out_fd, __in_fd, &off, __count);
49
+#define apr_sendfile_real sendfile
50
+#endif /* __USE_FILE_OFFSET64 */
52
#endif /* APR_HAS_SENDFILE */
54
/* sys/sysctl.h is only needed on FreeBSD for include_hdrs_in_length() */
59
- rv = sendfile(sock->socketdes, /* socket */
60
+ rv = apr_sendfile_real(sock->socketdes, /* socket */
61
file->filedes, /* open file descriptor of the file to be sent */
62
&off, /* where in the file to start */
63
*len); /* number of bytes to send */
68
- rv = sendfile(sock->socketdes, /* socket */
69
+ rv = apr_sendfile_real(sock->socketdes, /* socket */
70
file->filedes, /* open file descriptor of the file to be sent */
71
&off, /* where in the file to start */
72
*len); /* number of bytes to send */
74
--- build-tree/apache2/srclib/apr/include/arch/unix/apr_sendfile_wrapper.h 1969-12-31 17:00:00.000000000 -0700
75
+++ ../build-tree/apache2/srclib/apr/include/arch/unix/apr_sendfile_wrapper.h 2004-08-15 06:59:53.000000000 -0600
77
+/* sendfile -- copy data directly from one file descriptor to another
78
+ Copyright (C) 1998,99,01,2002 Free Software Foundation, Inc.
79
+ This file is part of the GNU C Library.
81
+ The GNU C Library is free software; you can redistribute it and/or
82
+ modify it under the terms of the GNU Lesser General Public
83
+ License as published by the Free Software Foundation; either
84
+ version 2.1 of the License, or (at your option) any later version.
86
+ The GNU C Library is distributed in the hope that it will be useful,
87
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
88
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
89
+ Lesser General Public License for more details.
91
+ You should have received a copy of the GNU Lesser General Public
92
+ License along with the GNU C Library; if not, write to the Free
93
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
96
+#warning Including custom sendfile.h for LFS64 builds only!
98
+#ifndef _SYS_SENDFILE_H
99
+#define _SYS_SENDFILE_H 1
101
+#include <features.h>
102
+#include <sys/types.h>
106
+/* Send up to COUNT bytes from file associated with IN_FD starting at
107
+ *OFFSET to descriptor OUT_FD. Set *OFFSET to the IN_FD's file position
108
+ following the read bytes. If OFFSET is a null pointer, use the normal
109
+ file position instead. Return the number of written bytes, or -1 in
111
+extern ssize_t sendfile (int __out_fd, int __in_fd, long *__offset,
112
+ size_t __count) __THROW;
114
+#ifdef __USE_LARGEFILE64
115
+extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
116
+ size_t __count) __THROW;
121
+#endif /* sys/sendfile.h */