~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/patches/to-review/024_largefiles_debian_hacks

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
3
 
@@ -217,7 +217,7 @@
4
 
 #define APR_HAS_UNICODE_FS        0
5
 
 #define APR_HAS_PROC_INVOKED      0
6
 
 #define APR_HAS_USER              1
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
11
 
 
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
14
 
@@ -73,7 +73,11 @@
15
 
 #include <fcntl.h>
16
 
 #endif
17
 
 #if APR_HAVE_SYS_SENDFILE_H
18
 
+# ifdef __USE_FILE_OFFSET64
19
 
+#include "apr_sendfile_wrapper.h"
20
 
+# else
21
 
 #include <sys/sendfile.h>
22
 
+# endif
23
 
 #endif
24
 
 #if APR_HAVE_SYS_IOCTL_H
25
 
 #include <sys/ioctl.h>
26
 
 
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
29
 
@@ -19,6 +19,25 @@
30
 
 #if APR_HAS_SENDFILE
31
 
 /* This file is needed to allow us access to the apr_file_t internals. */
32
 
 #include "apr_arch_file_io.h"
33
 
+
34
 
+#ifdef __USE_FILE_OFFSET64
35
 
+ssize_t apr_sendfile_real (int __out_fd, int __in_fd, __off64_t *__offset, size_t __count)
36
 
+{
37
 
+        apr_off_t off = *__offset;
38
 
+       ssize_t result;
39
 
+       
40
 
+        result = sendfile64 (__out_fd, __in_fd, &off, __count);
41
 
+        if ( errno == ENOSYS )
42
 
+        {
43
 
+               long off = *__offset;
44
 
+               result = sendfile (__out_fd, __in_fd, &off, __count);
45
 
+        }
46
 
+        return result;
47
 
+}
48
 
+#else
49
 
+#define apr_sendfile_real sendfile
50
 
+#endif /* __USE_FILE_OFFSET64 */
51
 
+
52
 
 #endif /* APR_HAS_SENDFILE */
53
 
 
54
 
 /* sys/sysctl.h is only needed on FreeBSD for include_hdrs_in_length() */
55
 
@@ -293,7 +312,7 @@
56
 
     }
57
 
 
58
 
     do {
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 */
64
 
@@ -310,7 +329,7 @@
65
 
         }
66
 
         else {
67
 
             do {
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 */
73
 
 
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
76
 
@@ -0,0 +1,45 @@
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.
80
 
+
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.
85
 
+
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.
90
 
+
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
94
 
+   02111-1307 USA.  */
95
 
+
96
 
+#warning Including custom sendfile.h for LFS64 builds only!
97
 
+
98
 
+#ifndef _SYS_SENDFILE_H
99
 
+#define _SYS_SENDFILE_H        1
100
 
+
101
 
+#include <features.h>
102
 
+#include <sys/types.h>
103
 
+
104
 
+__BEGIN_DECLS
105
 
+
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
110
 
+   case of error.  */
111
 
+extern ssize_t sendfile (int __out_fd, int __in_fd, long *__offset,
112
 
+                        size_t __count) __THROW;
113
 
+
114
 
+#ifdef __USE_LARGEFILE64
115
 
+extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
116
 
+                          size_t __count) __THROW;
117
 
+#endif
118
 
+
119
 
+__END_DECLS
120
 
+
121
 
+#endif /* sys/sendfile.h */