]> git.pld-linux.org Git - packages/apache.git/blame - apache-apr1.patch
- added HTTPD_CONF variable
[packages/apache.git] / apache-apr1.patch
CommitLineData
fb7841c8 1diff -ur httpd-2.0.52.org/include/ap_compat.h httpd-2.0.52/include/ap_compat.h
d72fdc2d
AM
2--- httpd-2.0.52.org/include/ap_compat.h 2004-10-02 18:25:54.675501812 +0200
3+++ httpd-2.0.52/include/ap_compat.h 2004-10-02 18:26:13.003575452 +0200
fb7841c8
AM
4@@ -17,7 +17,6 @@
5 #define AP_COMPAT_H
fa0f2add 6
fb7841c8
AM
7 /* Drag in apu (and therefore apr) renamed symbols */
8-#include "apu_compat.h"
fa0f2add 9
fb7841c8 10 /* redefine 1.3.x symbols to the new symbol names */
fa0f2add 11
fb7841c8 12diff -ur httpd-2.0.52.org/include/util_ldap.h httpd-2.0.52/include/util_ldap.h
d72fdc2d
AM
13--- httpd-2.0.52.org/include/util_ldap.h 2004-10-02 18:25:54.679500955 +0200
14+++ httpd-2.0.52/include/util_ldap.h 2004-10-02 18:29:46.928747001 +0200
fb7841c8
AM
15@@ -19,7 +19,7 @@
16 #include <apr_ldap.h>
fa0f2add 17
fb7841c8
AM
18 /* this whole thing disappears if LDAP is not enabled */
19-#ifdef APU_HAS_LDAP
20+#ifdef APR_HAS_LDAP
fa0f2add 21
fb7841c8
AM
22 /* APR header files */
23 #include <apr_thread_mutex.h>
d72fdc2d
AM
24@@ -291,5 +291,5 @@
25 */
26 char *util_ald_cache_display(request_rec *r, util_ldap_state_t *st);
27
28-#endif /* APU_HAS_LDAP */
29+#endif /* APR_HAS_LDAP */
30 #endif /* UTIL_LDAP_H */
fb7841c8 31diff -ur httpd-2.0.52.org/modules/aaa/mod_auth_digest.c httpd-2.0.52/modules/aaa/mod_auth_digest.c
d72fdc2d
AM
32--- httpd-2.0.52.org/modules/aaa/mod_auth_digest.c 2004-10-02 18:25:54.710494315 +0200
33+++ httpd-2.0.52/modules/aaa/mod_auth_digest.c 2004-10-02 18:26:13.010573952 +0200
fb7841c8
AM
34@@ -119,7 +119,7 @@
35 unsigned long key; /* the key for this entry */
36 struct hash_entry *next; /* next entry in the bucket */
37 unsigned long nonce_count; /* for nonce-count checking */
38- char ha1[2*MD5_DIGESTSIZE+1]; /* for algorithm=MD5-sess */
39+ char ha1[2*APR_MD5_DIGESTSIZE+1]; /* for algorithm=MD5-sess */
40 char last_nonce[NONCE_LEN+1]; /* for one-time nonce's */
41 } client_entry;
fa0f2add 42
fb7841c8 43diff -ur httpd-2.0.52.org/modules/cache/mod_file_cache.c httpd-2.0.52/modules/cache/mod_file_cache.c
d72fdc2d
AM
44--- httpd-2.0.52.org/modules/cache/mod_file_cache.c 2004-10-02 18:25:56.189177542 +0200
45+++ httpd-2.0.52/modules/cache/mod_file_cache.c 2004-10-02 18:26:13.012573524 +0200
fb7841c8
AM
46@@ -275,7 +275,7 @@
47 apr_mmap_t *mm;
48 apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
fa0f2add 49
fb7841c8
AM
50- apr_mmap_dup(&mm, file->mm, r->pool, 0);
51+ apr_mmap_dup(&mm, file->mm, r->pool);
52 b = apr_bucket_mmap_create(mm, 0, (apr_size_t)file->finfo.size,
53 c->bucket_alloc);
54 APR_BRIGADE_INSERT_TAIL(bb, b);
55diff -ur httpd-2.0.52.org/modules/dav/fs/lock.c httpd-2.0.52/modules/dav/fs/lock.c
d72fdc2d
AM
56--- httpd-2.0.52.org/modules/dav/fs/lock.c 2004-10-02 18:25:54.715493244 +0200
57+++ httpd-2.0.52/modules/dav/fs/lock.c 2004-10-02 18:26:13.016572667 +0200
fb7841c8
AM
58@@ -632,7 +632,7 @@
59 apr_status_t rv;
fa0f2add 60
fb7841c8
AM
61 /* if we don't see the file, then it's a locknull */
62- rv = apr_lstat(&finfo, fname, APR_FINFO_MIN, p);
63+ rv = apr_stat(&finfo, fname, APR_FINFO_MIN | APR_FINFO_LINK, p);
64 if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
65 if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
66 /* ### push a higher-level description? */
67diff -ur httpd-2.0.52.org/modules/dav/fs/repos.c httpd-2.0.52/modules/dav/fs/repos.c
d72fdc2d
AM
68--- httpd-2.0.52.org/modules/dav/fs/repos.c 2004-10-02 18:25:54.713493673 +0200
69+++ httpd-2.0.52/modules/dav/fs/repos.c 2004-10-02 18:26:13.020571811 +0200
fb7841c8 70@@ -1453,8 +1453,8 @@
fa0f2add 71
fa0f2add 72
fb7841c8
AM
73 /* ### Optimize me, dirent can give us what we need! */
74- status = apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf,
75- APR_FINFO_NORM, pool);
76+ status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
77+ APR_FINFO_NORM | APR_FINFO_LINK, pool);
78 if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
79 /* woah! where'd it go? */
80 /* ### should have a better error here */
81diff -ur httpd-2.0.52.org/modules/dav/main/util.c httpd-2.0.52/modules/dav/main/util.c
d72fdc2d
AM
82--- httpd-2.0.52.org/modules/dav/main/util.c 2004-10-02 18:25:54.724491317 +0200
83+++ httpd-2.0.52/modules/dav/main/util.c 2004-10-02 18:26:13.025570740 +0200
fb7841c8
AM
84@@ -213,7 +213,7 @@
85 /* now, verify that the URI uses the same scheme as the current.
86 request. the port must match our port.
87 */
88- apr_sockaddr_port_get(&port, r->connection->local_addr);
89+ port = r->connection->local_addr->port;
90 if (strcasecmp(comp.scheme, scheme) != 0
91 #ifdef APACHE_PORT_HANDLING_IS_BUSTED
92 || comp.port != port
93diff -ur httpd-2.0.52.org/modules/experimental/mod_auth_ldap.c httpd-2.0.52/modules/experimental/mod_auth_ldap.c
d72fdc2d
AM
94--- httpd-2.0.52.org/modules/experimental/mod_auth_ldap.c 2004-10-02 18:25:56.315150555 +0200
95+++ httpd-2.0.52/modules/experimental/mod_auth_ldap.c 2004-10-02 18:26:13.028570097 +0200
fb7841c8
AM
96@@ -42,7 +42,7 @@
97 #include "http_request.h"
98 #include "util_ldap.h"
fa0f2add 99
fb7841c8
AM
100-#ifndef APU_HAS_LDAP
101+#ifndef APR_HAS_LDAP
102 #error mod_auth_ldap requires APR-util to have LDAP support built in
103 #endif
fa0f2add 104
fb7841c8 105@@ -695,6 +695,7 @@
fa0f2add 106 {
fb7841c8
AM
107 int result;
108 apr_ldap_url_desc_t *urld;
109+ apr_ldap_err_t *reserr;
fa0f2add 110
fb7841c8 111 mod_auth_ldap_config_t *sec = config;
fa0f2add 112
fb7841c8
AM
113@@ -702,16 +703,14 @@
114 cmd->server, "[%d] auth_ldap url parse: `%s'",
115 getpid(), url);
116
117- result = apr_ldap_url_parse(url, &(urld));
118+ result = apr_ldap_url_parse(cmd->pool, url, &(urld), &reserr);
119 if (result != LDAP_SUCCESS) {
120 switch (result) {
121- case LDAP_URL_ERR_NOTLDAP:
122+ case APR_LDAP_URL_ERR_BADSCHEME:
123 return "LDAP URL does not begin with ldap://";
124- case LDAP_URL_ERR_NODN:
125- return "LDAP URL does not have a DN";
126- case LDAP_URL_ERR_BADSCOPE:
127+ case APR_LDAP_URL_ERR_BADSCOPE:
128 return "LDAP URL has an invalid scope";
129- case LDAP_URL_ERR_MEM:
130+ case APR_LDAP_URL_ERR_MEM:
131 return "Out of memory parsing LDAP URL";
132 default:
133 return "Could not parse LDAP URL";
134@@ -802,7 +801,6 @@
fa0f2add 135 }
fa0f2add 136
fb7841c8
AM
137 sec->have_ldap_url = 1;
138- apr_ldap_free_urldesc(urld);
139 return NULL;
fa0f2add
JB
140 }
141
fb7841c8 142diff -ur httpd-2.0.52.org/modules/experimental/mod_cache.h httpd-2.0.52/modules/experimental/mod_cache.h
d72fdc2d
AM
143--- httpd-2.0.52.org/modules/experimental/mod_cache.h 2004-10-02 18:25:56.308152055 +0200
144+++ httpd-2.0.52/modules/experimental/mod_cache.h 2004-10-02 18:26:13.030569669 +0200
fb7841c8
AM
145@@ -172,7 +172,7 @@
146 void *vobj; /* Opaque portion (specific to the cache implementation) of the cache object */
147 apr_size_t count; /* Number of body bytes written to the cache so far */
148 int complete;
149- apr_atomic_t refcount;
150+ apr_uint32_t refcount;
151 apr_size_t cleanup;
152 };
fa0f2add 153
fb7841c8 154diff -ur httpd-2.0.52.org/modules/experimental/mod_case_filter.c httpd-2.0.52/modules/experimental/mod_case_filter.c
d72fdc2d
AM
155--- httpd-2.0.52.org/modules/experimental/mod_case_filter.c 2004-10-02 18:25:56.324148628 +0200
156+++ httpd-2.0.52/modules/experimental/mod_case_filter.c 2004-10-02 18:26:13.035568598 +0200
fb7841c8
AM
157@@ -60,7 +60,7 @@
158 apr_bucket_brigade *pbbOut;
fa0f2add 159
fb7841c8
AM
160 pbbOut=apr_brigade_create(r->pool, c->bucket_alloc);
161- APR_BRIGADE_FOREACH(pbktIn,pbbIn)
162+ for(pbktIn = APR_BRIGADE_FIRST(pbbIn); pbktIn != APR_BRIGADE_SENTINEL(pbbIn); pbktIn = APR_BUCKET_NEXT(pbktIn))
163 {
164 const char *data;
165 apr_size_t len;
166diff -ur httpd-2.0.52.org/modules/experimental/mod_mem_cache.c httpd-2.0.52/modules/experimental/mod_mem_cache.c
d72fdc2d
AM
167--- httpd-2.0.52.org/modules/experimental/mod_mem_cache.c 2004-10-02 18:25:56.307152269 +0200
168+++ httpd-2.0.52/modules/experimental/mod_mem_cache.c 2004-10-02 18:26:13.039567741 +0200
fb7841c8
AM
169@@ -140,14 +140,14 @@
170 cache_object_t *obj = (cache_object_t *)a;
171 mem_cache_object_t *mobj = obj->vobj;
fa0f2add 172
fb7841c8
AM
173- apr_atomic_set(&mobj->pos, pos);
174+ apr_atomic_set32(&mobj->pos, pos);
175 }
176 static apr_ssize_t memcache_get_pos(void *a)
177 {
178 cache_object_t *obj = (cache_object_t *)a;
179 mem_cache_object_t *mobj = obj->vobj;
fa0f2add 180
fb7841c8
AM
181- return apr_atomic_read(&mobj->pos);
182+ return apr_atomic_read32(&mobj->pos);
183 }
fa0f2add 184
fb7841c8
AM
185 static apr_size_t memcache_cache_get_size(void*a)
186@@ -177,7 +177,7 @@
187 /* Decrement the refcount to account for the object being ejected
188 * from the cache. If the refcount is 0, free the object.
189 */
190- if (!apr_atomic_dec(&obj->refcount)) {
191+ if (!apr_atomic_dec32(&obj->refcount)) {
192 cleanup_cache_object(obj);
fa0f2add 193 }
fb7841c8
AM
194 }
195@@ -298,7 +298,7 @@
196 tobj = cache_find(sconf->cache_cache, obj->key);
197 if (tobj == obj) {
198 cache_remove(sconf->cache_cache, obj);
199- apr_atomic_dec(&obj->refcount);
200+ apr_atomic_dec32(&obj->refcount);
201 }
202 if (sconf->lock) {
203 apr_thread_mutex_unlock(sconf->lock);
204@@ -306,7 +306,7 @@
205 }
fa0f2add 206
fb7841c8
AM
207 /* If the refcount drops to 0, cleanup the cache object */
208- if (!apr_atomic_dec(&obj->refcount)) {
209+ if (!apr_atomic_dec32(&obj->refcount)) {
210 cleanup_cache_object(obj);
211 }
212 return APR_SUCCESS;
213@@ -329,7 +329,7 @@
214 obj = cache_pop(co->cache_cache);
215 while (obj) {
216 /* Iterate over the cache and clean up each unreferenced entry */
217- if (!apr_atomic_dec(&obj->refcount)) {
218+ if (!apr_atomic_dec32(&obj->refcount)) {
219 cleanup_cache_object(obj);
fa0f2add 220 }
fb7841c8
AM
221 obj = cache_pop(co->cache_cache);
222@@ -425,7 +425,7 @@
fa0f2add 223 }
fa0f2add 224
fb7841c8
AM
225 /* Finish initing the cache object */
226- apr_atomic_set(&obj->refcount, 1);
227+ apr_atomic_set32(&obj->refcount, 1);
228 mobj->total_refs = 1;
229 obj->complete = 0;
230 obj->vobj = mobj;
231@@ -456,7 +456,7 @@
232 * hashtable in the cache. Refcount should be 2 now, one
233 * for this thread, and one for the cache.
234 */
235- apr_atomic_inc(&obj->refcount);
236+ apr_atomic_inc32(&obj->refcount);
fa0f2add 237 }
fb7841c8
AM
238 if (sconf->lock) {
239 apr_thread_mutex_unlock(sconf->lock);
240@@ -504,7 +504,7 @@
241 if (obj) {
242 if (obj->complete) {
243 request_rec *rmain=r, *rtmp;
244- apr_atomic_inc(&obj->refcount);
245+ apr_atomic_inc32(&obj->refcount);
246 /* cache is worried about overall counts, not 'open' ones */
247 cache_update(sconf->cache_cache, obj);
fa0f2add 248
fb7841c8
AM
249@@ -564,7 +564,7 @@
250 tobj = cache_find(sconf->cache_cache, obj->key);
251 if (tobj == obj) {
252 cache_remove(sconf->cache_cache, obj);
253- apr_atomic_dec(&obj->refcount);
254+ apr_atomic_dec32(&obj->refcount);
255 }
256
257 if (sconf->lock) {
258@@ -648,7 +648,7 @@
259 if (obj) {
260 cache_remove(sconf->cache_cache, obj);
261 /* For performance, cleanup cache object after releasing the lock */
262- cleanup = !apr_atomic_dec(&obj->refcount);
263+ cleanup = !apr_atomic_dec32(&obj->refcount);
264 }
265 if (sconf->lock) {
266 apr_thread_mutex_unlock(sconf->lock);
267@@ -931,14 +931,14 @@
268 cache_remove(sconf->cache_cache, obj);
269 /* For illustration, cache no longer has reference to the object
270 * so decrement the refcount
271- * apr_atomic_dec(&obj->refcount);
272+ * apr_atomic_dec32(&obj->refcount);
273 */
274 mobj->m_len = obj->count;
275
276 cache_insert(sconf->cache_cache, obj);
277 /* For illustration, cache now has reference to the object, so
278 * increment the refcount
279- * apr_atomic_inc(&obj->refcount);
280+ * apr_atomic_inc32(&obj->refcount);
281 */
282 }
283 else if (tobj) {
284@@ -951,7 +951,7 @@
285 /* Object has been ejected from the cache, add it back to the cache */
286 mobj->m_len = obj->count;
287 cache_insert(sconf->cache_cache, obj);
288- apr_atomic_inc(&obj->refcount);
289+ apr_atomic_inc32(&obj->refcount);
290 }
fa0f2add 291
fb7841c8 292 if (sconf->lock) {
fb7841c8 293diff -ur httpd-2.0.52.org/modules/experimental/util_ldap.c httpd-2.0.52/modules/experimental/util_ldap.c
d72fdc2d
AM
294--- httpd-2.0.52.org/modules/experimental/util_ldap.c 2004-10-02 18:25:56.324148628 +0200
295+++ httpd-2.0.52/modules/experimental/util_ldap.c 2004-10-02 18:26:13.043566884 +0200
fb7841c8
AM
296@@ -38,7 +38,7 @@
297 #include <unistd.h>
fa0f2add
JB
298 #endif
299
fb7841c8
AM
300-#ifndef APU_HAS_LDAP
301+#ifndef APR_HAS_LDAP
302 #error mod_ldap requires APR-util to have LDAP support built in
303 #endif
fa0f2add 304
d72fdc2d
AM
305diff -ur httpd-2.0.52.org/modules/experimental/util_ldap_cache.c httpd-2.0.52/modules/experimental/util_ldap_cache.c
306--- httpd-2.0.52.org/modules/experimental/util_ldap_cache.c 2004-10-02 18:25:56.310151626 +0200
307+++ httpd-2.0.52/modules/experimental/util_ldap_cache.c 2004-10-02 18:29:51.839694945 +0200
308@@ -26,7 +26,7 @@
309 #include "util_ldap.h"
310 #include "util_ldap_cache.h"
311
312-#ifdef APU_HAS_LDAP
313+#ifdef APR_HAS_LDAP
314
315 #if APR_HAS_SHARED_MEMORY
316 #define MODLDAP_SHMEM_CACHE "/tmp/mod_ldap_cache"
317@@ -426,4 +426,4 @@
318 }
319
320
321-#endif /* APU_HAS_LDAP */
322+#endif /* APR_HAS_LDAP */
fb7841c8 323diff -ur httpd-2.0.52.org/modules/experimental/util_ldap_cache.h httpd-2.0.52/modules/experimental/util_ldap_cache.h
d72fdc2d
AM
324--- httpd-2.0.52.org/modules/experimental/util_ldap_cache.h 2004-10-02 18:25:56.311151412 +0200
325+++ httpd-2.0.52/modules/experimental/util_ldap_cache.h 2004-10-02 18:26:13.045566456 +0200
fb7841c8
AM
326@@ -21,7 +21,7 @@
327 */
fa0f2add 328
fb7841c8
AM
329 /* this whole thing disappears if LDAP is not enabled */
330-#ifdef APU_HAS_LDAP
331+#ifdef APR_HAS_LDAP
fa0f2add 332
fa0f2add 333
fb7841c8 334 /*
d72fdc2d
AM
335diff -ur httpd-2.0.52.org/modules/experimental/util_ldap_cache_mgr.c httpd-2.0.52/modules/experimental/util_ldap_cache_mgr.c
336--- httpd-2.0.52.org/modules/experimental/util_ldap_cache_mgr.c 2004-10-02 18:25:56.312151198 +0200
337+++ httpd-2.0.52/modules/experimental/util_ldap_cache_mgr.c 2004-10-02 18:29:58.135346250 +0200
338@@ -26,7 +26,7 @@
339 #include "util_ldap_cache.h"
340 #include <apr_strings.h>
341
342-#ifdef APU_HAS_LDAP
343+#ifdef APR_HAS_LDAP
344
345 /* only here until strdup is gone */
346 #include <string.h>
347@@ -737,4 +737,4 @@
348 return buf;
349 }
350
351-#endif /* APU_HAS_LDAP */
352+#endif /* APR_HAS_LDAP */
fb7841c8 353diff -ur httpd-2.0.52.org/modules/filters/mod_deflate.c httpd-2.0.52/modules/filters/mod_deflate.c
d72fdc2d
AM
354--- httpd-2.0.52.org/modules/filters/mod_deflate.c 2004-10-02 18:25:56.233168118 +0200
355+++ httpd-2.0.52/modules/filters/mod_deflate.c 2004-10-02 18:26:13.049565599 +0200
fb7841c8
AM
356@@ -694,7 +694,7 @@
357 return rv;
fa0f2add
JB
358 }
359
fb7841c8
AM
360- APR_BRIGADE_FOREACH(bkt, ctx->bb) {
361+ for(bkt = APR_BRIGADE_FIRST(ctx->bb); bkt != APR_BRIGADE_SENTINEL(ctx->bb); bkt = APR_BUCKET_NEXT(bkt)) {
fa0f2add
JB
362 const char *data;
363 apr_size_t len;
364
fb7841c8 365diff -ur httpd-2.0.52.org/modules/filters/mod_ext_filter.c httpd-2.0.52/modules/filters/mod_ext_filter.c
d72fdc2d
AM
366--- httpd-2.0.52.org/modules/filters/mod_ext_filter.c 2004-10-02 18:25:56.235167690 +0200
367+++ httpd-2.0.52/modules/filters/mod_ext_filter.c 2004-10-02 18:26:13.329505629 +0200
fb7841c8
AM
368@@ -487,18 +487,15 @@
369
370 #if APR_FILES_AS_SOCKETS
371 {
372- apr_socket_t *newsock;
373-
374- rc = apr_poll_setup(&ctx->pollset, 2, ctx->p);
375- ap_assert(rc == APR_SUCCESS);
376- rc = apr_socket_from_file(&newsock, ctx->proc->in);
377- ap_assert(rc == APR_SUCCESS);
378- rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLOUT);
379- ap_assert(rc == APR_SUCCESS);
380- rc = apr_socket_from_file(&newsock, ctx->proc->out);
381- ap_assert(rc == APR_SUCCESS);
382- rc = apr_poll_socket_add(ctx->pollset, newsock, APR_POLLIN);
383- ap_assert(rc == APR_SUCCESS);
384+ ctx->pollset = apr_pcalloc(ctx->p, sizeof(apr_pollfd_t) * 2);
385+ ctx->pollset[0].p = ctx->p;
386+ ctx->pollset[0].desc.f = ctx->proc->in;
387+ ctx->pollset[0].desc_type = APR_POLL_FILE;
388+ ctx->pollset[0].reqevents = APR_POLLOUT;
389+ ctx->pollset[1].p = ctx->p;
390+ ctx->pollset[1].desc.f = ctx->proc->out;
391+ ctx->pollset[1].desc_type = APR_POLL_FILE;
392+ ctx->pollset[1].reqevents = APR_POLLIN;
fa0f2add 393 }
fb7841c8
AM
394 #endif
395
396@@ -744,7 +741,7 @@
fa0f2add 397 }
fb7841c8 398 dc = ctx->dc;
fa0f2add 399
fb7841c8
AM
400- APR_BRIGADE_FOREACH(b, bb) {
401+ for(b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
402
403 if (APR_BUCKET_IS_EOS(b)) {
404 eos = b;
405diff -ur httpd-2.0.52.org/modules/filters/mod_include.c httpd-2.0.52/modules/filters/mod_include.c
d72fdc2d
AM
406--- httpd-2.0.52.org/modules/filters/mod_include.c 2004-10-02 18:25:56.231168547 +0200
407+++ httpd-2.0.52/modules/filters/mod_include.c 2004-10-02 18:26:13.343502630 +0200
fb7841c8
AM
408@@ -209,7 +209,7 @@
409 val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0);
410 }
411 else if (!strcasecmp(var, "USER_NAME")) {
412- if (apr_get_username(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
413+ if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
414 val = "<unknown>";
415 }
fa0f2add 416 }
fb7841c8 417@@ -3004,7 +3004,7 @@
fa0f2add 418
fb7841c8
AM
419 if (!APR_BRIGADE_EMPTY(pass_bb)) {
420 rv = ap_pass_brigade(f->next, pass_bb);
421- if (!APR_STATUS_IS_SUCCESS(rv)) {
422+ if (rv != APR_SUCCESS) {
423 apr_brigade_destroy(pass_bb);
424 return rv;
fa0f2add 425 }
fb7841c8
AM
426@@ -3025,11 +3025,11 @@
427 }
428 }
fa0f2add 429
fb7841c8
AM
430- if (!len || !APR_STATUS_IS_SUCCESS(rv)) {
431+ if (!len || (rv != APR_SUCCESS)) {
432 rv = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
fa0f2add 433 }
fb7841c8
AM
434
435- if (!APR_STATUS_IS_SUCCESS(rv)) {
436+ if (rv != APR_SUCCESS) {
437 apr_brigade_destroy(pass_bb);
438 return rv;
fa0f2add 439 }
fb7841c8 440diff -ur httpd-2.0.52.org/modules/generators/mod_autoindex.c httpd-2.0.52/modules/generators/mod_autoindex.c
d72fdc2d
AM
441--- httpd-2.0.52.org/modules/generators/mod_autoindex.c 2004-10-02 18:25:56.335146272 +0200
442+++ httpd-2.0.52/modules/generators/mod_autoindex.c 2004-10-02 18:26:13.419486353 +0200
fb7841c8
AM
443@@ -773,7 +773,7 @@
444 */
445
446 #ifdef CASE_BLIND_FILESYSTEM
447-#define MATCH_FLAGS FNM_CASE_BLIND
448+#define MATCH_FLAGS APR_FNM_CASE_BLIND
449 #else
450 #define MATCH_FLAGS 0
451 #endif
452@@ -1259,7 +1259,7 @@
453
454 #ifndef CASE_BLIND_FILESYSTEM
455 if (pattern && (apr_fnmatch(pattern, dirent->name,
456- FNM_NOESCAPE | FNM_PERIOD)
457+ APR_FNM_NOESCAPE | APR_FNM_PERIOD)
458 != APR_SUCCESS))
459 return (NULL);
460 #else /* !CASE_BLIND_FILESYSTEM */
461@@ -1269,7 +1269,7 @@
462 * reliably - so we have to granularise at the OS level.
463 */
464 if (pattern && (apr_fnmatch(pattern, dirent->name,
465- FNM_NOESCAPE | FNM_PERIOD | FNM_CASE_BLIND)
466+ APR_FNM_NOESCAPE | APR_FNM_PERIOD | APR_FNM_CASE_BLIND)
467 != APR_SUCCESS))
468 return (NULL);
469 #endif /* !CASE_BLIND_FILESYSTEM */
470diff -ur httpd-2.0.52.org/modules/generators/mod_cgi.c httpd-2.0.52/modules/generators/mod_cgi.c
d72fdc2d
AM
471--- httpd-2.0.52.org/modules/generators/mod_cgi.c 2004-10-02 18:25:56.337145843 +0200
472+++ httpd-2.0.52/modules/generators/mod_cgi.c 2004-10-02 18:26:13.424485282 +0200
fb7841c8
AM
473@@ -274,7 +274,7 @@
474 apr_file_printf(f, "%s\n", sbuf);
475
476 first = 1;
477- APR_BRIGADE_FOREACH(e, bb) {
478+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
479 if (APR_BUCKET_IS_EOS(e)) {
480 break;
fa0f2add 481 }
fb7841c8
AM
482@@ -458,7 +458,7 @@
483 /* Bad things happened. Everyone should have cleaned up. */
484 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
485 "couldn't create child process: %d: %s", rc,
486- apr_filename_of_pathname(r->filename));
487+ apr_filepath_name_get(r->filename));
fa0f2add
JB
488 }
489 else {
fb7841c8
AM
490 apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
491@@ -540,7 +540,7 @@
492 const char *buf;
493 apr_size_t len;
494 apr_status_t rv;
495- APR_BRIGADE_FOREACH(e, bb) {
496+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
497 if (APR_BUCKET_IS_EOS(e)) {
fa0f2add 498 break;
fa0f2add 499 }
fb7841c8
AM
500@@ -750,7 +750,7 @@
501 return DECLINED;
502 }
fa0f2add 503
fb7841c8
AM
504- argv0 = apr_filename_of_pathname(r->filename);
505+ argv0 = apr_filepath_name_get(r->filename);
506 nph = !(strncmp(argv0, "nph-", 4));
507 conf = ap_get_module_config(r->server->module_config, &cgi_module);
fa0f2add 508
fb7841c8
AM
509@@ -833,7 +833,7 @@
510 return rv;
511 }
fa0f2add 512
fb7841c8
AM
513- APR_BRIGADE_FOREACH(bucket, bb) {
514+ for(bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) {
515 const char *data;
516 apr_size_t len;
fa0f2add 517
fb7841c8 518diff -ur httpd-2.0.52.org/modules/generators/mod_cgid.c httpd-2.0.52/modules/generators/mod_cgid.c
d72fdc2d
AM
519--- httpd-2.0.52.org/modules/generators/mod_cgid.c 2004-10-02 18:25:56.369138990 +0200
520+++ httpd-2.0.52/modules/generators/mod_cgid.c 2004-10-02 18:26:13.431483782 +0200
fb7841c8
AM
521@@ -748,7 +748,7 @@
522 */
523 ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
524 "couldn't create child process: %d: %s", rc,
525- apr_filename_of_pathname(r->filename));
526+ apr_filepath_name_get(r->filename));
527 }
528 else {
529 /* We don't want to leak storage for the key, so only allocate
530@@ -1030,12 +1030,12 @@
531 apr_file_printf(f, "%s\n", sbuf);
fa0f2add 532
fb7841c8
AM
533 first = 1;
534- APR_BRIGADE_FOREACH(e, bb) {
535+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
536 if (APR_BUCKET_IS_EOS(e)) {
537 break;
538 }
539 rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ);
540- if (!APR_STATUS_IS_SUCCESS(rv) || (len == 0)) {
541+ if ((rv != APR_SUCCESS) || (len == 0)) {
542 break;
543 }
544 if (first) {
545@@ -1131,12 +1131,12 @@
546 const char *buf;
547 apr_size_t len;
548 apr_status_t rv;
549- APR_BRIGADE_FOREACH(e, bb) {
550+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
551 if (APR_BUCKET_IS_EOS(e)) {
552 break;
553 }
554 rv = apr_bucket_read(e, &buf, &len, APR_BLOCK_READ);
555- if (!APR_STATUS_IS_SUCCESS(rv)) {
556+ if (rv != APR_SUCCESS) {
557 break;
558 }
559 }
560@@ -1370,7 +1370,7 @@
561 return rv;
562 }
563
564- APR_BRIGADE_FOREACH(bucket, bb) {
565+ for(bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) {
566 const char *data;
567 apr_size_t len;
fa0f2add 568
fb7841c8 569diff -ur httpd-2.0.52.org/modules/http/http_core.c httpd-2.0.52/modules/http/http_core.c
d72fdc2d
AM
570--- httpd-2.0.52.org/modules/http/http_core.c 2004-10-02 18:25:55.959226804 +0200
571+++ httpd-2.0.52/modules/http/http_core.c 2004-10-02 18:26:13.435482926 +0200
fa0f2add
JB
572@@ -115,7 +115,7 @@
573 */
574 char chunk_hdr[20]; /* enough space for the snprintf below */
575
576- APR_BRIGADE_FOREACH(e, b) {
577+ for(e = APR_BRIGADE_FIRST(b); e != APR_BRIGADE_SENTINEL(b); e = APR_BUCKET_NEXT(e)) {
578 if (APR_BUCKET_IS_EOS(e)) {
579 /* there shouldn't be anything after the eos */
580 eos = e;
fb7841c8 581diff -ur httpd-2.0.52.org/modules/http/http_protocol.c httpd-2.0.52/modules/http/http_protocol.c
d72fdc2d
AM
582--- httpd-2.0.52.org/modules/http/http_protocol.c 2004-10-02 18:25:55.957227232 +0200
583+++ httpd-2.0.52/modules/http/http_protocol.c 2004-10-02 18:26:13.443481212 +0200
fa0f2add
JB
584@@ -1534,7 +1534,7 @@
585 }
586 }
587
588- APR_BRIGADE_FOREACH(e, b) {
589+ for(e = APR_BRIGADE_FIRST(b); e != APR_BRIGADE_SENTINEL(b); e = APR_BUCKET_NEXT(e)) {
590 if (e->type == &ap_bucket_type_error) {
591 ap_bucket_error *eb = e->data;
592
593@@ -1976,7 +1976,7 @@
594 }
595 }
596
597- APR_BRIGADE_FOREACH(bucket, bb) {
598+ for(bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb); bucket = APR_BUCKET_NEXT(bucket)) {
599 const char *data;
600 apr_size_t len;
601
fb7841c8 602diff -ur httpd-2.0.52.org/modules/mappers/mod_negotiation.c httpd-2.0.52/modules/mappers/mod_negotiation.c
d72fdc2d
AM
603--- httpd-2.0.52.org/modules/mappers/mod_negotiation.c 2004-10-02 18:25:56.206173901 +0200
604+++ httpd-2.0.52/modules/mappers/mod_negotiation.c 2004-10-02 18:26:13.449479927 +0200
fb7841c8
AM
605@@ -959,7 +959,7 @@
606 break;
607 }
608 mime_info.bytes = len;
609- mime_info.file_name = apr_filename_of_pathname(rr->filename);
610+ mime_info.file_name = apr_filepath_name_get(rr->filename);
611 }
fa0f2add 612 }
fb7841c8
AM
613 else {
614diff -ur httpd-2.0.52.org/modules/mappers/mod_rewrite.c httpd-2.0.52/modules/mappers/mod_rewrite.c
d72fdc2d
AM
615--- httpd-2.0.52.org/modules/mappers/mod_rewrite.c 2004-10-02 18:25:56.203174544 +0200
616+++ httpd-2.0.52/modules/mappers/mod_rewrite.c 2004-10-02 18:26:13.457478214 +0200
fb7841c8
AM
617@@ -2323,7 +2323,7 @@
618 }
619 else if (strcmp(p->pattern, "-l") == 0) {
620 #if !defined(OS2)
621- if (apr_lstat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) {
622+ if (apr_stat(&sb, input, APR_FINFO_MIN | APR_FINFO_LINK, r->pool) == APR_SUCCESS) {
623 if (sb.filetype == APR_LNK) {
624 rc = 1;
625 }
626@@ -2949,7 +2949,7 @@
627 user[j] = '\0';
fa0f2add 628
fb7841c8
AM
629 /* lookup username in systems passwd file */
630- if (apr_get_home_directory(&homedir, user, r->pool) == APR_SUCCESS) {
631+ if (apr_uid_homepath_get(&homedir, user, r->pool) == APR_SUCCESS) {
632 /* ok, user was found, so expand the ~user string */
633 if (uri[i] != '\0') {
634 /* ~user/anything... has to be expanded */
635@@ -3962,13 +3962,13 @@
636 else if (strcasecmp(var, "SCRIPT_USER") == 0) {
637 result = "<unknown>";
638 if (r->finfo.valid & APR_FINFO_USER) {
639- apr_get_username((char **)&result, r->finfo.user, r->pool);
640+ apr_uid_name_get((char **)&result, r->finfo.user, r->pool);
641 }
642 }
643 else if (strcasecmp(var, "SCRIPT_GROUP") == 0) {
644 result = "<unknown>";
645 if (r->finfo.valid & APR_FINFO_GROUP) {
646- apr_group_name_get((char **)&result, r->finfo.group, r->pool);
647+ apr_gid_name_get((char **)&result, r->finfo.group, r->pool);
648 }
649 } else if (strcasecmp(var, "HTTPS") == 0) {
650 int flag = rewrite_is_https && rewrite_is_https(r->connection);
651diff -ur httpd-2.0.52.org/modules/mappers/mod_userdir.c httpd-2.0.52/modules/mappers/mod_userdir.c
d72fdc2d
AM
652--- httpd-2.0.52.org/modules/mappers/mod_userdir.c 2004-10-02 18:25:56.215171973 +0200
653+++ httpd-2.0.52/modules/mappers/mod_userdir.c 2004-10-02 18:26:13.459477785 +0200
fb7841c8
AM
654@@ -282,7 +282,7 @@
655 #if APR_HAS_USER
656 char *homedir;
fa0f2add 657
fb7841c8
AM
658- if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
659+ if (apr_uid_homepath_get(&homedir, w, r->pool) == APR_SUCCESS) {
660 filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
661 }
662 #else
663@@ -333,7 +333,7 @@
664 return NULL;
fa0f2add 665 }
fb7841c8
AM
666
667- if (apr_get_userid(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
668+ if (apr_uid_get(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
669 return NULL;
fa0f2add 670 }
fb7841c8
AM
671
672diff -ur httpd-2.0.52.org/modules/proxy/proxy_connect.c httpd-2.0.52/modules/proxy/proxy_connect.c
d72fdc2d
AM
673--- httpd-2.0.52.org/modules/proxy/proxy_connect.c 2004-10-02 18:25:56.197175829 +0200
674+++ httpd-2.0.52/modules/proxy/proxy_connect.c 2004-10-02 18:26:13.463476929 +0200
fb7841c8
AM
675@@ -224,10 +224,10 @@
676 "proxy: CONNECT: sending the CONNECT request to the remote proxy");
677 nbytes = apr_snprintf(buffer, sizeof(buffer),
678 "CONNECT %s HTTP/1.0" CRLF, r->uri);
679- apr_send(sock, buffer, &nbytes);
680+ apr_socket_send(sock, buffer, &nbytes);
681 nbytes = apr_snprintf(buffer, sizeof(buffer),
682 "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
683- apr_send(sock, buffer, &nbytes);
684+ apr_socket_send(sock, buffer, &nbytes);
fa0f2add
JB
685 }
686 else {
fb7841c8
AM
687 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
688@@ -235,11 +235,11 @@
689 nbytes = apr_snprintf(buffer, sizeof(buffer),
690 "HTTP/1.0 200 Connection Established" CRLF);
691 ap_xlate_proto_to_ascii(buffer, nbytes);
692- apr_send(client_socket, buffer, &nbytes);
693+ apr_socket_send(client_socket, buffer, &nbytes);
694 nbytes = apr_snprintf(buffer, sizeof(buffer),
695 "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
696 ap_xlate_proto_to_ascii(buffer, nbytes);
697- apr_send(client_socket, buffer, &nbytes);
698+ apr_socket_send(client_socket, buffer, &nbytes);
699 #if 0
700 /* This is safer code, but it doesn't work yet. I'm leaving it
701 * here so that I can fix it later.
702@@ -262,7 +262,7 @@
fa0f2add 703
fb7841c8 704 /* r->sent_bodyct = 1;*/
fa0f2add 705
fb7841c8
AM
706- if((rv = apr_poll_setup(&pollfd, 2, r->pool)) != APR_SUCCESS)
707+ if((pollfd = apr_pcalloc(r->pool, sizeof(apr_pollfd_t) * 2)) == NULL)
708 {
709 apr_socket_close(sock);
710 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
711@@ -271,10 +271,16 @@
712 }
fa0f2add 713
fb7841c8
AM
714 /* Add client side to the poll */
715- apr_poll_socket_add(pollfd, client_socket, APR_POLLIN);
716+ pollfd[0].p = r->pool;
717+ pollfd[0].desc.s = client_socket;
718+ pollfd[0].desc_type = APR_POLL_SOCKET;
719+ pollfd[0].reqevents = APR_POLLIN;
fa0f2add 720
fb7841c8
AM
721 /* Add the server side to the poll */
722- apr_poll_socket_add(pollfd, sock, APR_POLLIN);
723+ pollfd[1].p = r->pool;
724+ pollfd[1].desc.s = sock;
725+ pollfd[1].desc_type = APR_POLL_SOCKET;
726+ pollfd[1].reqevents = APR_POLLIN;
fa0f2add 727
fb7841c8
AM
728 while (1) { /* Infinite loop until error (one side closes the connection) */
729 /* ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: CONNECT: going to sleep (poll)");*/
730@@ -288,12 +294,12 @@
731 "proxy: CONNECT: woke from select(), i=%d", pollcnt);*/
fa0f2add 732
fb7841c8
AM
733 if (pollcnt) {
734- apr_poll_revents_get(&pollevent, sock, pollfd);
735+ pollevent = pollfd[1].rtnevents;
736 if (pollevent & APR_POLLIN) {
737 /* ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
738 "proxy: CONNECT: sock was set");*/
739 nbytes = sizeof(buffer);
740- if (apr_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
741+ if (apr_socket_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
742 o = 0;
743 i = nbytes;
744 while(i > 0)
745@@ -305,7 +311,7 @@
746 * if ((nbytes = ap_rwrite(buffer + o, nbytes, r)) < 0)
747 * rbb
748 */
749- if (apr_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
750+ if (apr_socket_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
751 break;
752 o += nbytes;
753 i -= nbytes;
754@@ -318,18 +324,18 @@
755 break;
fa0f2add 756
fa0f2add 757
fb7841c8
AM
758- apr_poll_revents_get(&pollevent, client_socket, pollfd);
759+ pollevent = pollfd[0].rtnevents;
760 if (pollevent & APR_POLLIN) {
761 /* ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
762 "proxy: CONNECT: client was set");*/
763 nbytes = sizeof(buffer);
764- if (apr_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
765+ if (apr_socket_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
766 o = 0;
767 i = nbytes;
768 while(i > 0)
769 {
770 nbytes = i;
771- if (apr_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
772+ if (apr_socket_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
773 break;
774 o += nbytes;
775 i -= nbytes;
776diff -ur httpd-2.0.52.org/modules/proxy/proxy_ftp.c httpd-2.0.52/modules/proxy/proxy_ftp.c
d72fdc2d
AM
777--- httpd-2.0.52.org/modules/proxy/proxy_ftp.c 2004-10-02 18:25:56.196176043 +0200
778+++ httpd-2.0.52/modules/proxy/proxy_ftp.c 2004-10-02 18:26:13.468475858 +0200
fa0f2add
JB
779@@ -931,7 +931,7 @@
780 int failed = 1;
781 while (connect_addr) {
782
783- if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
784+ if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, APR_PROTO_TCP, r->pool)) != APR_SUCCESS) {
785 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
786 "proxy: FTP: error creating socket");
787 connect_addr = connect_addr->next;
788@@ -970,7 +970,7 @@
789 connect_addr->family, connect_addr, connectname);
790
791 /* make the connection out of the socket */
792- rv = apr_connect(sock, connect_addr);
793+ rv = apr_socket_connect(sock, connect_addr);
794
795 /* if an error occurred, loop round and try again */
796 if (rv != APR_SUCCESS) {
797@@ -1249,7 +1249,7 @@
798 "proxy: FTP: EPSV contacting remote host on port %d",
799 data_port);
800
801- if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
802+ if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, APR_PROTO_TCP, r->pool)) != APR_SUCCESS) {
803 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
804 "proxy: FTP: error creating EPSV socket");
805 return HTTP_INTERNAL_SERVER_ERROR;
806@@ -1268,7 +1268,7 @@
807 apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
808 apr_sockaddr_ip_get(&data_ip, data_addr);
809 apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port, 0, p);
810- rv = apr_connect(data_sock, epsv_addr);
811+ rv = apr_socket_connect(data_sock, epsv_addr);
812 if (rv != APR_SUCCESS) {
813 ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
814 "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?", epsv_addr);
815@@ -1336,7 +1336,7 @@
816 "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d",
817 h3, h2, h1, h0, pasvport);
818
819- if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
820+ if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, APR_PROTO_TCP, r->pool)) != APR_SUCCESS) {
821 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
822 "proxy: error creating PASV socket");
823 return HTTP_INTERNAL_SERVER_ERROR;
824@@ -1353,7 +1353,7 @@
825
826 /* make the connection */
827 apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p);
828- rv = apr_connect(data_sock, pasv_addr);
829+ rv = apr_socket_connect(data_sock, pasv_addr);
830 if (rv != APR_SUCCESS) {
831 ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
832 "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
833@@ -1379,13 +1379,13 @@
834 apr_port_t local_port;
835 unsigned int h0, h1, h2, h3, p0, p1;
836
837- if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
838+ if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, APR_PROTO_TCP, r->pool)) != APR_SUCCESS) {
839 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
840 "proxy: FTP: error creating local socket");
841 return HTTP_INTERNAL_SERVER_ERROR;
842 }
843 apr_socket_addr_get(&local_addr, APR_LOCAL, sock);
844- apr_sockaddr_port_get(&local_port, local_addr);
845+ local_port = local_addr->port;
846 apr_sockaddr_ip_get(&local_ip, local_addr);
847
848 if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
849@@ -1399,14 +1399,14 @@
850
851 apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
852
853- if ((rv = apr_bind(local_sock, local_addr)) != APR_SUCCESS) {
854+ if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
855 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
856 "proxy: FTP: error binding to ftp data socket %pI", local_addr);
857 return HTTP_INTERNAL_SERVER_ERROR;
858 }
859
860 /* only need a short queue */
861- if ((rv = apr_listen(local_sock, 2)) != APR_SUCCESS) {
862+ if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
863 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
864 "proxy: FTP: error listening to ftp data socket %pI", local_addr);
865 return HTTP_INTERNAL_SERVER_ERROR;
866@@ -1743,7 +1743,7 @@
867 /* wait for connection */
868 if (use_port) {
869 for (;;) {
870- rv = apr_accept(&data_sock, local_sock, r->pool);
871+ rv = apr_socket_accept(&data_sock, local_sock, r->pool);
872 if (rv == APR_EINTR) {
873 continue;
874 }
fb7841c8 875diff -ur httpd-2.0.52.org/modules/proxy/proxy_http.c httpd-2.0.52/modules/proxy/proxy_http.c
d72fdc2d
AM
876--- httpd-2.0.52.org/modules/proxy/proxy_http.c 2004-10-02 18:25:56.191177114 +0200
877+++ httpd-2.0.52/modules/proxy/proxy_http.c 2004-10-02 18:26:13.471475215 +0200
fa0f2add
JB
878@@ -294,7 +294,7 @@
879 apr_socket_timeout_get(p_conn->sock, &current_timeout);
880 /* set no timeout */
881 apr_socket_timeout_set(p_conn->sock, 0);
882- socket_status = apr_recv(p_conn->sock, test_buffer, &buffer_len);
883+ socket_status = apr_socket_recv(p_conn->sock, test_buffer, &buffer_len);
884 /* put back old timeout */
885 apr_socket_timeout_set(p_conn->sock, current_timeout);
886 if ( APR_STATUS_IS_EOF(socket_status) ) {
fb7841c8 887diff -ur httpd-2.0.52.org/modules/proxy/proxy_util.c httpd-2.0.52/modules/proxy/proxy_util.c
d72fdc2d
AM
888--- httpd-2.0.52.org/modules/proxy/proxy_util.c 2004-10-02 18:25:56.194176471 +0200
889+++ httpd-2.0.52/modules/proxy/proxy_util.c 2004-10-02 18:26:13.475474358 +0200
fb7841c8
AM
890@@ -1102,7 +1102,7 @@
891
892 while (backend_addr && !connected) {
893 if ((rv = apr_socket_create(newsock, backend_addr->family,
894- SOCK_STREAM, p)) != APR_SUCCESS) {
895+ SOCK_STREAM, APR_PROTO_TCP, p)) != APR_SUCCESS) {
896 loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
897 ap_log_error(APLOG_MARK, loglevel, rv, s,
898 "proxy: %s: error creating fam %d socket for target %s",
899@@ -1140,7 +1140,7 @@
900 proxy_function, backend_addr->family, backend_name);
fa0f2add 901
fb7841c8
AM
902 /* make the connection out of the socket */
903- rv = apr_connect(*newsock, backend_addr);
904+ rv = apr_socket_connect(*newsock, backend_addr);
fa0f2add 905
fb7841c8
AM
906 /* if an error occurred, loop round and try again */
907 if (rv != APR_SUCCESS) {
908diff -ur httpd-2.0.52.org/modules/ssl/mod_ssl.c httpd-2.0.52/modules/ssl/mod_ssl.c
d72fdc2d
AM
909--- httpd-2.0.52.org/modules/ssl/mod_ssl.c 2004-10-02 18:25:54.741487676 +0200
910+++ httpd-2.0.52/modules/ssl/mod_ssl.c 2004-10-02 18:26:13.477473930 +0200
fb7841c8
AM
911@@ -333,7 +333,7 @@
912 sc->vhost_id_len);
913
914 if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
915- MD5_DIGESTSIZE*2))
916+ APR_MD5_DIGESTSIZE*2))
fa0f2add 917 {
fb7841c8
AM
918 ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
919 "Unable to set session id context to `%s'", vhost_md5);
920diff -ur httpd-2.0.52.org/modules/ssl/ssl_engine_init.c httpd-2.0.52/modules/ssl/ssl_engine_init.c
d72fdc2d
AM
921--- httpd-2.0.52.org/modules/ssl/ssl_engine_init.c 2004-10-02 18:25:54.753485106 +0200
922+++ httpd-2.0.52/modules/ssl/ssl_engine_init.c 2004-10-02 18:26:13.481473073 +0200
fb7841c8 923@@ -823,11 +823,11 @@
fa0f2add
JB
924 }
925
fb7841c8
AM
926 if (SSL_X509_getCN(ptemp, cert, &cn)) {
927- int fnm_flags = FNM_PERIOD|FNM_CASE_BLIND;
928+ int fnm_flags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND;
fa0f2add 929
fb7841c8
AM
930 if (apr_fnmatch_test(cn) &&
931 (apr_fnmatch(cn, s->server_hostname,
932- fnm_flags) == FNM_NOMATCH))
933+ fnm_flags) == APR_FNM_NOMATCH))
934 {
935 ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
936 "%s server certificate wildcard CommonName (CN) `%s' "
937diff -ur httpd-2.0.52.org/modules/ssl/ssl_scache_dbm.c httpd-2.0.52/modules/ssl/ssl_scache_dbm.c
d72fdc2d
AM
938--- httpd-2.0.52.org/modules/ssl/ssl_scache_dbm.c 2004-10-02 18:25:54.752485320 +0200
939+++ httpd-2.0.52/modules/ssl/ssl_scache_dbm.c 2004-10-02 18:26:13.509467076 +0200
fb7841c8
AM
940@@ -84,7 +84,7 @@
941 SSLModConfigRec *mc = myModConfig(s);
942 apr_pool_t *p;
fa0f2add 943
fb7841c8
AM
944- apr_pool_sub_make(&p, mc->pPool, NULL);
945+ apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
946 if (p != NULL) {
947 /* the correct way */
948 unlink(apr_pstrcat(p, mc->szSessionCacheDataFile, SSL_DBM_FILE_SUFFIX_DIR, NULL));
949@@ -331,7 +331,7 @@
950 ssl_mutex_on(s);
951 for (;;) {
952 /* allocate the key array in a memory sub pool */
953- apr_pool_sub_make(&p, mc->pPool, NULL);
954+ apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
955 if (p == NULL)
956 break;
957 if ((keylist = apr_palloc(p, sizeof(dbmkey)*KEYMAX)) == NULL) {
958diff -ur httpd-2.0.52.org/os/unix/unixd.c httpd-2.0.52/os/unix/unixd.c
d72fdc2d
AM
959--- httpd-2.0.52.org/os/unix/unixd.c 2004-10-02 18:25:57.168967645 +0200
960+++ httpd-2.0.52/os/unix/unixd.c 2004-10-02 18:26:13.513466220 +0200
fb7841c8
AM
961@@ -464,7 +464,7 @@
962 apr_status_t status;
fa0f2add 963
fb7841c8
AM
964 *accepted = NULL;
965- status = apr_accept(&csd, lr->sd, ptrans);
966+ status = apr_socket_accept(&csd, lr->sd, ptrans);
967 if (status == APR_SUCCESS) {
968 *accepted = csd;
969 return APR_SUCCESS;
970diff -ur httpd-2.0.52.org/server/config.c httpd-2.0.52/server/config.c
d72fdc2d
AM
971--- httpd-2.0.52.org/server/config.c 2004-10-02 18:25:57.290941515 +0200
972+++ httpd-2.0.52/server/config.c 2004-10-02 18:26:13.518465149 +0200
fb7841c8
AM
973@@ -1546,7 +1546,7 @@
974 && !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
975 apr_finfo_t finfo;
fa0f2add 976
fb7841c8
AM
977- if (apr_lstat(&finfo, fname, APR_FINFO_TYPE, p) != APR_SUCCESS)
978+ if (apr_stat(&finfo, fname, APR_FINFO_TYPE | APR_FINFO_LINK, p) != APR_SUCCESS)
979 return;
980 }
fa0f2add 981
fb7841c8
AM
982@@ -1605,7 +1605,7 @@
983 if (strcmp(dirent.name, ".")
984 && strcmp(dirent.name, "..")
985 && (apr_fnmatch(pattern, dirent.name,
986- FNM_PERIOD) == APR_SUCCESS)) {
987+ APR_FNM_PERIOD) == APR_SUCCESS)) {
988 fnew = (fnames *) apr_array_push(candidates);
989 fnew->fname = ap_make_full_path(p, path, dirent.name);
fa0f2add 990 }
fb7841c8 991diff -ur httpd-2.0.52.org/server/connection.c httpd-2.0.52/server/connection.c
d72fdc2d
AM
992--- httpd-2.0.52.org/server/connection.c 2004-10-02 18:25:57.286942372 +0200
993+++ httpd-2.0.52/server/connection.c 2004-10-02 18:26:13.520464720 +0200
fb7841c8
AM
994@@ -131,7 +131,7 @@
995 /* Shut down the socket for write, which will send a FIN
996 * to the peer.
997 */
998- if (apr_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
999+ if (apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
1000 || c->aborted) {
1001 apr_socket_close(csd);
1002 return;
1003@@ -147,7 +147,7 @@
1004 apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
1005 while (1) {
1006 nbytes = sizeof(dummybuf);
1007- rc = apr_recv(csd, dummybuf, &nbytes);
1008+ rc = apr_socket_recv(csd, dummybuf, &nbytes);
1009 if (rc != APR_SUCCESS || nbytes == 0)
1010 break;
1011
1012diff -ur httpd-2.0.52.org/server/core.c httpd-2.0.52/server/core.c
d72fdc2d
AM
1013--- httpd-2.0.52.org/server/core.c 2004-10-02 18:25:57.303938731 +0200
1014+++ httpd-2.0.52/server/core.c 2004-10-02 18:26:13.531462364 +0200
fb7841c8
AM
1015@@ -2916,7 +2916,7 @@
1016
1017 /* XXX handle checking for non-blocking socket */
1018 while (bytes_written != len) {
1019- rv = apr_sendv(s, vec + i, nvec - i, &n);
1020+ rv = apr_socket_sendv(s, vec + i, nvec - i, &n);
1021 bytes_written += n;
1022 if (rv != APR_SUCCESS)
1023 return rv;
1024@@ -2924,7 +2924,7 @@
1025 *nbytes += n;
1026
1027 /* If the write did not complete, adjust the iovecs and issue
1028- * apr_sendv again
1029+ * apr_socket_sendv again
1030 */
1031 if (bytes_written < len) {
1032 /* Skip over the vectors that have already been written */
1033@@ -2979,7 +2979,7 @@
1034 do {
1035 apr_size_t tmplen = file_bytes_left;
1036
1037- rv = apr_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
1038+ rv = apr_socket_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
1039 flags);
1040 *bytes_sent += tmplen;
1041 total_bytes_left -= tmplen;
1042@@ -3090,7 +3090,7 @@
1043 rv = apr_file_read(fd, buffer, &sendlen);
1044 while (rv == APR_SUCCESS && sendlen) {
1045 bytes_sent = sendlen;
1046- rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
1047+ rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
1048 if (rv == APR_SUCCESS) {
1049 sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
1050 o += bytes_sent; /* o is where we are in the buffer */
1051@@ -3873,7 +3873,7 @@
fa0f2add 1052 }
fb7841c8
AM
1053 else if (mode == AP_MODE_SPECULATIVE) {
1054 apr_bucket *copy_bucket;
1055- APR_BRIGADE_FOREACH(e, ctx->b) {
1056+ for(e = APR_BRIGADE_FIRST(ctx->b); e != APR_BRIGADE_SENTINEL(ctx->b); e = APR_BUCKET_NEXT(e)) {
1057 rv = apr_bucket_copy(e, &copy_bucket);
1058 if (rv != APR_SUCCESS) {
1059 return rv;
1060@@ -3948,7 +3948,7 @@
1061 more = NULL;
1062
1063 /* Iterate over the brigade: collect iovecs and/or a file */
1064- APR_BRIGADE_FOREACH(e, b) {
1065+ for(e = APR_BRIGADE_FIRST(b); e != APR_BRIGADE_SENTINEL(b); e = APR_BUCKET_NEXT(e)) {
1066 /* keep track of the last bucket processed */
1067 last_e = e;
1068 if (APR_BUCKET_IS_EOS(e) || AP_BUCKET_IS_EOC(e)) {
1069@@ -4212,7 +4212,7 @@
1070 headers */
1071 &bytes_sent, /* how many bytes were
1072 sent */
1073- flags); /* apr_sendfile flags */
1074+ flags); /* apr_socket_sendfile flags */
1075
1076 if (logio_add_bytes_out && bytes_sent > 0)
1077 logio_add_bytes_out(c, bytes_sent);
1078diff -ur httpd-2.0.52.org/server/core.c.orig httpd-2.0.52/server/core.c.orig
d72fdc2d
AM
1079--- httpd-2.0.52.org/server/core.c.orig 2004-10-02 18:25:57.296940230 +0200
1080+++ httpd-2.0.52/server/core.c.orig 2004-10-02 18:26:13.667433236 +0200
fb7841c8
AM
1081@@ -4298,6 +4298,25 @@
1082
1083 ap_set_version(pconf);
1084 ap_setup_make_content_type(pconf);
1085+
1086+#ifdef RLIMIT_CORE
1087+ if (ap_coredumpdir_configured) {
1088+ struct rlimit lim;
1089+
1090+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
1091+ lim.rlim_cur = lim.rlim_max;
1092+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
1093+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
1094+ "core dump file size limit raised to %lu bytes",
1095+ lim.rlim_cur);
1096+ } else {
1097+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
1098+ "core dump file size is zero, setrlimit failed");
1099+ }
1100+ }
1101+ }
1102+#endif
1103+
1104 return OK;
1105 }
1106
1107diff -ur httpd-2.0.52.org/server/listen.c httpd-2.0.52/server/listen.c
d72fdc2d
AM
1108--- httpd-2.0.52.org/server/listen.c 2004-10-02 18:25:57.304938516 +0200
1109+++ httpd-2.0.52/server/listen.c 2004-10-02 18:26:13.670432593 +0200
fb7841c8
AM
1110@@ -122,7 +122,7 @@
1111 ap_sock_disable_nagle(s);
1112 #endif
1113
1114- if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
1115+ if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
1116 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
1117 "make_sock: could not bind to address %pI",
1118 server->bind_addr);
1119@@ -130,7 +130,7 @@
1120 return stat;
fa0f2add 1121 }
fa0f2add 1122
fb7841c8
AM
1123- if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
1124+ if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
1125 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
1126 "make_sock: unable to listen for connections "
1127 "on address %pI",
1128@@ -213,10 +213,10 @@
1129 apr_socket_t *tmp_sock;
1130 apr_sockaddr_t *sa;
1131
1132- if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, p))
1133+ if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, APR_PROTO_TCP, p))
1134 == APR_SUCCESS &&
1135 apr_sockaddr_info_get(&sa, NULL, APR_INET6, 0, 0, p) == APR_SUCCESS &&
1136- apr_bind(tmp_sock, sa) == APR_SUCCESS) {
1137+ apr_socket_bind(tmp_sock, sa) == APR_SUCCESS) {
1138 default_family = APR_INET6;
fa0f2add 1139 }
fb7841c8
AM
1140 else {
1141@@ -261,7 +261,7 @@
1142 sa = (*walk)->bind_addr;
1143 /* Some listeners are not real so they will not have a bind_addr. */
1144 if (sa) {
1145- apr_sockaddr_port_get(&oldport, sa);
1146+ oldport = sa->port;
1147 if (!strcmp(sa->hostname, addr) && port == oldport) {
1148 /* re-use existing record */
1149 new = *walk;
1150@@ -286,7 +286,7 @@
fa0f2add 1151 }
fb7841c8
AM
1152 if ((status = apr_socket_create(&new->sd,
1153 new->bind_addr->family,
1154- SOCK_STREAM, process->pool))
1155+ SOCK_STREAM, APR_PROTO_TCP, process->pool))
1156 != APR_SUCCESS) {
1157 ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
1158 "alloc_listener: failed to get a socket for %s", addr);
1159diff -ur httpd-2.0.52.org/server/main.c httpd-2.0.52/server/main.c
d72fdc2d
AM
1160--- httpd-2.0.52.org/server/main.c 2004-10-02 18:25:57.292941087 +0200
1161+++ httpd-2.0.52/server/main.c 2004-10-02 18:26:13.673431951 +0200
fb7841c8
AM
1162@@ -238,7 +238,7 @@
1163 apr_pool_tag(process->pconf, "pconf");
1164 process->argc = argc;
1165 process->argv = argv;
1166- process->short_name = apr_filename_of_pathname(argv[0]);
1167+ process->short_name = apr_filepath_name_get(argv[0]);
1168 return process;
1169 }
1170
1171diff -ur httpd-2.0.52.org/server/mpm/experimental/metuxmpm/metuxmpm.c httpd-2.0.52/server/mpm/experimental/metuxmpm/metuxmpm.c
d72fdc2d
AM
1172--- httpd-2.0.52.org/server/mpm/experimental/metuxmpm/metuxmpm.c 2004-10-02 18:25:57.241952010 +0200
1173+++ httpd-2.0.52/server/mpm/experimental/metuxmpm/metuxmpm.c 2004-10-02 18:26:13.678430880 +0200
fb7841c8
AM
1174@@ -819,7 +819,7 @@
1175 if (workers_may_exit) return APR_SUCCESS;
1176
1177 apr_thread_mutex_lock(pipe_of_death_mutex);
1178- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1179+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1180 if (APR_STATUS_IS_EAGAIN(ret))
1181 {
1182 /* It lost the lottery. It must continue to suffer
1183@@ -975,6 +975,7 @@
1184 while (!workers_may_exit)
1185 {
1186 apr_int16_t event;
1187+ int ifd;
1188
1189 _DBG("loop. conn_id=%d req_max=%d req_remain=%d",
1190 conn_id, ap_max_requests_per_child, requests_this_child);
1191@@ -993,14 +994,18 @@
1192
1193 /* -- setup pollset -- */
1194 /* NOTE: we do _not_ do this upwards anylonger */
1195- apr_poll_setup(&pollset, num_listensocks, tpool);
1196- apr_poll_setup(&pollset, num_listensocks, ptrans);
1197+ pollset = apr_pcalloc(ptrans, sizeof(apr_pollfd_t) * num_listensocks);
1198+ ifd = 0;
1199 for(lr_walk = ap_listeners; lr_walk != NULL; lr_walk = lr_walk->next)
1200 {
1201 int fd;
1202- apr_poll_socket_add(pollset, lr_walk->sd, APR_POLLIN);
1203+ pollset[ifd].p = ptrans;
1204+ pollset[ifd].desc.s = lr_walk->sd;
1205+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1206+ pollset[ifd].reqevents = APR_POLLIN;
1207 apr_os_sock_get(&fd, lr_walk->sd);
1208 _DBG("adding fd %d to pollset", fd);
1209+ ifd++;
fa0f2add 1210 }
fa0f2add 1211
fb7841c8
AM
1212 if (workers_may_exit) goto worker_out;
1213@@ -1032,10 +1037,13 @@
1214 _DBG("looking for an listener",0);
1215 for (lr_walk=ap_listeners; lr_walk!=NULL; lr_walk = lr_walk->next)
1216 {
1217- int fd_tmp;
1218+ int fd_tmp, fdt;
1219 apr_os_sock_get(&fd_tmp, lr_walk->sd);
1220 _DBG(" ... trying w/ fd=%d", fd_tmp);
1221- apr_poll_revents_get(&event, lr_walk->sd, pollset);
1222+ for(fdt = 0; fdt < num_listensocks; fdt++)
1223+ if(pollset[fdt].desc.s == lr_walk->sd)
1224+ break;
1225+ event = pollset[fdt].rtnevents;
1226 if (event & (APR_POLLIN))
1227 {
1228 THREAD_ACCEPT_UNLOCK;
1229@@ -1588,7 +1596,7 @@
1230 }
1231 #if APR_HAS_OTHER_CHILD
fa0f2add 1232 }
fb7841c8
AM
1233- else if (apr_proc_other_child_read(&pid, status) == 0)
1234+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0)
1235 {
1236 /* handled */
1237 #endif
1238diff -ur httpd-2.0.52.org/server/mpm/experimental/perchild/perchild.c httpd-2.0.52/server/mpm/experimental/perchild/perchild.c
d72fdc2d
AM
1239--- httpd-2.0.52.org/server/mpm/experimental/perchild/perchild.c 2004-10-02 18:25:57.234953509 +0200
1240+++ httpd-2.0.52/server/mpm/experimental/perchild/perchild.c 2004-10-02 18:26:13.682430023 +0200
fb7841c8
AM
1241@@ -552,7 +552,7 @@
1242 char pipe_read_char;
1243 apr_size_t n = 1;
1244
1245- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1246+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1247 if (APR_STATUS_IS_EAGAIN(ret)) {
1248 /* It lost the lottery. It must continue to suffer
1249 * through a life of servitude. */
1250@@ -643,7 +643,7 @@
1251 apr_pollfd_t *pollset;
1252 apr_status_t rv;
1253 ap_listen_rec *lr, *last_lr = ap_listeners;
1254- int n;
1255+ int n, ifd;
1256 apr_bucket_alloc_t *bucket_alloc;
1257
1258 apr_thread_mutex_lock(thread_pool_parent_mutex);
1259@@ -657,10 +657,15 @@
1260
1261 bucket_alloc = apr_bucket_alloc_create(apr_thread_pool_get(thd));
1262
1263- apr_poll_setup(&pollset, num_listensocks, tpool);
1264+ pollset = apr_pcalloc(tpool, sizeof(apr_pollfd_t) * num_listensocks);
1265+ ifd = 0;
1266 for(lr = ap_listeners; lr != NULL; lr = lr->next) {
1267 int fd;
1268- apr_poll_socket_add(pollset, lr->sd, APR_POLLIN);
1269+ pollset[ifd].p = tpool;
1270+ pollset[ifd].desc.s = lr->sd;
1271+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1272+ pollset[ifd].reqevents = APR_POLLIN;
1273+ ifd++;
1274
1275 apr_os_sock_get(&fd, lr->sd);
fa0f2add 1276 }
fb7841c8
AM
1277@@ -726,7 +731,10 @@
1278 lr = ap_listeners;
1279 }
1280 /* XXX: Should we check for POLLERR? */
1281- apr_poll_revents_get(&event, lr->sd, pollset);
1282+ for(ifd = 0; ifd < num_listensocks; ifd++)
1283+ if(pollset[ifd].desc.s == lr->sd)
1284+ break;
1285+ event = pollset[ifd].rtnevents;
1286 if (event & (APR_POLLIN)) {
1287 last_lr = lr;
1288 goto got_fd;
1289@@ -1170,7 +1178,7 @@
1290 }
1291 #if APR_HAS_OTHER_CHILD
1292 }
1293- else if (apr_proc_other_child_read(&pid, status) == 0) {
1294+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1295 /* handled */
1296 #endif
1297 }
1298diff -ur httpd-2.0.52.org/server/mpm/experimental/peruser/peruser.c httpd-2.0.52/server/mpm/experimental/peruser/peruser.c
d72fdc2d
AM
1299--- httpd-2.0.52.org/server/mpm/experimental/peruser/peruser.c 2004-10-02 18:25:57.245951153 +0200
1300+++ httpd-2.0.52/server/mpm/experimental/peruser/peruser.c 2004-10-02 18:26:13.687428952 +0200
fb7841c8
AM
1301@@ -625,7 +625,7 @@
1302 if (die_now) return APR_SUCCESS;
1303
1304 /* apr_thread_mutex_lock(pipe_of_death_mutex); */
1305- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1306+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1307 if (APR_STATUS_IS_EAGAIN(ret))
1308 {
1309 /* It lost the lottery. It must continue to suffer
1310@@ -1985,7 +1985,7 @@
1311 }
1312 #if APR_HAS_OTHER_CHILD
1313 }
1314- else if (apr_proc_other_child_read(&pid, status) == 0) {
1315+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1316 _DBG("APR_HAS_OTHER_CHILD, apparently", 0);
1317 /* handled */
1318 #endif
1319diff -ur httpd-2.0.52.org/server/mpm/prefork/prefork.c httpd-2.0.52/server/mpm/prefork/prefork.c
d72fdc2d
AM
1320--- httpd-2.0.52.org/server/mpm/prefork/prefork.c 2004-10-02 18:25:57.273945156 +0200
1321+++ httpd-2.0.52/server/mpm/prefork/prefork.c 2004-10-02 18:26:13.691428095 +0200
fb7841c8
AM
1322@@ -1002,7 +1002,7 @@
1323 }
1324 #if APR_HAS_OTHER_CHILD
1325 }
1326- else if (apr_proc_other_child_read(&pid, status) == 0) {
1327+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1328 /* handled */
1329 #endif
1330 }
1331diff -ur httpd-2.0.52.org/server/mpm/worker/pod.c httpd-2.0.52/server/mpm/worker/pod.c
d72fdc2d
AM
1332--- httpd-2.0.52.org/server/mpm/worker/pod.c 2004-10-02 18:25:57.245951153 +0200
1333+++ httpd-2.0.52/server/mpm/worker/pod.c 2004-10-02 18:26:13.693427667 +0200
fb7841c8
AM
1334@@ -34,8 +34,8 @@
1335 (*pod)->p = p;
1336
1337 /* close these before exec. */
1338- apr_file_unset_inherit((*pod)->pod_in);
1339- apr_file_unset_inherit((*pod)->pod_out);
1340+ apr_file_inherit_unset((*pod)->pod_in);
1341+ apr_file_inherit_unset((*pod)->pod_out);
1342
1343 return APR_SUCCESS;
1344 }
1345diff -ur httpd-2.0.52.org/server/mpm/worker/worker.c httpd-2.0.52/server/mpm/worker/worker.c
d72fdc2d
AM
1346--- httpd-2.0.52.org/server/mpm/worker/worker.c 2004-10-02 18:25:57.269946013 +0200
1347+++ httpd-2.0.52/server/mpm/worker/worker.c 2004-10-02 18:26:13.697426810 +0200
fb7841c8
AM
1348@@ -578,13 +578,19 @@
1349 apr_pollfd_t *pollset;
1350 apr_status_t rv;
1351 ap_listen_rec *lr, *last_lr = ap_listeners;
1352- int have_idle_worker = 0;
1353+ int have_idle_worker = 0, ifd;
1354
1355 free(ti);
1356
1357- apr_poll_setup(&pollset, num_listensocks, tpool);
1358- for(lr = ap_listeners ; lr != NULL ; lr = lr->next)
1359- apr_poll_socket_add(pollset, lr->sd, APR_POLLIN);
1360+ pollset = apr_pcalloc(tpool, sizeof(apr_pollfd_t) * num_listensocks);
1361+ ifd = 0;
1362+ for(lr = ap_listeners ; lr != NULL ; lr = lr->next) {
1363+ pollset[ifd].p = tpool;
1364+ pollset[ifd].desc.s = lr->sd;
1365+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1366+ pollset[ifd].reqevents = APR_POLLIN;
1367+ ifd++;
1368+ }
1369
1370 /* Unblock the signal used to wake this thread up, and set a handler for
1371 * it.
1372@@ -670,7 +676,10 @@
1373 lr = ap_listeners;
1374 }
1375 /* XXX: Should we check for POLLERR? */
1376- apr_poll_revents_get(&event, lr->sd, pollset);
1377+ for(ifd = 0; ifd < num_listensocks; ifd++)
1378+ if(pollset[ifd].desc.s == lr->sd)
1379+ break;
1380+ event = pollset[ifd].rtnevents;
1381 if (event & APR_POLLIN) {
1382 last_lr = lr;
1383 goto got_fd;
1384@@ -1500,7 +1509,7 @@
1385 }
1386 #if APR_HAS_OTHER_CHILD
1387 }
1388- else if (apr_proc_other_child_read(&pid, status) == 0) {
1389+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1390 /* handled */
1391 #endif
1392 }
1393diff -ur httpd-2.0.52.org/server/mpm_common.c httpd-2.0.52/server/mpm_common.c
d72fdc2d
AM
1394--- httpd-2.0.52.org/server/mpm_common.c 2004-10-02 18:25:57.275944728 +0200
1395+++ httpd-2.0.52/server/mpm_common.c 2004-10-02 18:26:13.700426168 +0200
fb7841c8
AM
1396@@ -150,7 +150,7 @@
1397 }
1398
1399 #if APR_HAS_OTHER_CHILD
1400- apr_proc_other_child_check();
1401+ apr_proc_other_child_refresh_all(APR_OC_REASON_RESTART);
1402 #endif
fa0f2add 1403
fb7841c8
AM
1404 if (!not_dead_yet) {
1405@@ -371,8 +371,8 @@
1406 APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
fa0f2add 1407
fb7841c8
AM
1408 /* close these before exec. */
1409- apr_file_unset_inherit((*pod)->pod_in);
1410- apr_file_unset_inherit((*pod)->pod_out);
1411+ apr_file_inherit_unset((*pod)->pod_in);
1412+ apr_file_inherit_unset((*pod)->pod_out);
fa0f2add 1413
fb7841c8
AM
1414 return APR_SUCCESS;
1415 }
1416@@ -445,7 +445,7 @@
1417 return rv;
fa0f2add 1418 }
fa0f2add 1419
fb7841c8
AM
1420- rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, p);
1421+ rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
1422 if (rv != APR_SUCCESS) {
1423 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
1424 "get socket to connect to listener");
1425@@ -466,7 +466,7 @@
1426 return rv;
fa0f2add 1427 }
fa0f2add 1428
fb7841c8
AM
1429- rv = apr_connect(sock, pod->sa);
1430+ rv = apr_socket_connect(sock, pod->sa);
1431 if (rv != APR_SUCCESS) {
1432 int log_level = APLOG_WARNING;
fa0f2add 1433
fb7841c8 1434diff -ur httpd-2.0.52.org/server/protocol.c httpd-2.0.52/server/protocol.c
d72fdc2d
AM
1435--- httpd-2.0.52.org/server/protocol.c 2004-10-02 18:25:57.276944514 +0200
1436+++ httpd-2.0.52/server/protocol.c 2004-10-02 18:26:13.704425311 +0200
fb7841c8
AM
1437@@ -223,7 +223,7 @@
1438 return APR_EGENERAL;
1439 }
fa0f2add 1440
fb7841c8
AM
1441- APR_BRIGADE_FOREACH(e, bb) {
1442+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
1443 const char *str;
1444 apr_size_t len;
fa0f2add 1445
fb7841c8 1446diff -ur httpd-2.0.52.org/server/request.c httpd-2.0.52/server/request.c
d72fdc2d
AM
1447--- httpd-2.0.52.org/server/request.c 2004-10-02 18:25:57.281943443 +0200
1448+++ httpd-2.0.52/server/request.c 2004-10-02 18:26:13.709424240 +0200
fb7841c8
AM
1449@@ -375,7 +375,7 @@
1450 * owner of the symlink, then get the info of the target.
1451 */
1452 if (!(lfi->valid & APR_FINFO_OWNER)) {
1453- if ((res = apr_lstat(&fi, d, lfi->valid | APR_FINFO_OWNER, p))
1454+ if ((res = apr_stat(&fi, d, lfi->valid | APR_FINFO_OWNER | APR_FINFO_LINK, p))
1455 != APR_SUCCESS) {
1456 return HTTP_FORBIDDEN;
fa0f2add 1457 }
fb7841c8
AM
1458@@ -386,7 +386,7 @@
1459 return HTTP_FORBIDDEN;
fa0f2add 1460 }
fa0f2add 1461
fb7841c8
AM
1462- if (apr_compare_users(fi.user, lfi->user) != APR_SUCCESS) {
1463+ if (apr_uid_compare(fi.user, lfi->user) != APR_SUCCESS) {
1464 return HTTP_FORBIDDEN;
1465 }
1466
1467@@ -763,7 +763,7 @@
1468 && ((entry_core->d_components < seg)
1469 || (entry_core->d_is_fnmatch
1470 ? (apr_fnmatch(entry_core->d, r->filename,
1471- FNM_PATHNAME) != APR_SUCCESS)
1472+ APR_FNM_PATHNAME) != APR_SUCCESS)
1473 : (strcmp(r->filename, entry_core->d) != 0)))) {
1474 continue;
fa0f2add 1475 }
fb7841c8
AM
1476@@ -939,8 +939,8 @@
1477 * want the name of this 'link' object, not the name of its
1478 * target, if we are fixing the filename case/resolving aliases.
1479 */
1480- rv = apr_lstat(&thisinfo, r->filename,
1481- APR_FINFO_MIN | APR_FINFO_NAME, r->pool);
1482+ rv = apr_stat(&thisinfo, r->filename,
1483+ APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK, r->pool);
fa0f2add 1484
fb7841c8
AM
1485 if (APR_STATUS_IS_ENOENT(rv)) {
1486 /* Nothing? That could be nice. But our directory
1487@@ -1230,7 +1230,7 @@
1488 if (entry_core->r
1489 ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0)
1490 : (entry_core->d_is_fnmatch
1491- ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
1492+ ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1493 : (strncmp(entry_core->d, cache->cached, len)
1494 || (entry_core->d[len - 1] != '/'
1495 && cache->cached[len] != '/'
1496@@ -1379,7 +1379,7 @@
1497 if (entry_core->r
1498 ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
1499 : (entry_core->d_is_fnmatch
1500- ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
1501+ ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1502 : strcmp(entry_core->d, cache->cached))) {
1503 continue;
fa0f2add 1504 }
fb7841c8 1505@@ -1690,8 +1690,8 @@
fa0f2add 1506 }
fb7841c8
AM
1507 }
1508 else {
1509- if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
1510- APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
1511+ if (((rv = apr_stat(&rnew->finfo, rnew->filename,
1512+ APR_FINFO_MIN | APR_FINFO_LINK, rnew->pool)) != APR_SUCCESS)
1513 && (rv != APR_INCOMPLETE)) {
1514 rnew->finfo.filetype = 0;
1515 }
1516@@ -1795,8 +1795,8 @@
1517 }
1518 }
1519 else {
1520- if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
1521- APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
1522+ if (((rv = apr_stat(&rnew->finfo, rnew->filename,
1523+ APR_FINFO_MIN | APR_FINFO_LINK, rnew->pool)) != APR_SUCCESS)
1524 && (rv != APR_INCOMPLETE)) {
1525 rnew->finfo.filetype = 0;
1526 }
1527diff -ur httpd-2.0.52.org/server/rfc1413.c httpd-2.0.52/server/rfc1413.c
d72fdc2d
AM
1528--- httpd-2.0.52.org/server/rfc1413.c 2004-10-02 18:25:57.274944942 +0200
1529+++ httpd-2.0.52/server/rfc1413.c 2004-10-02 18:26:13.712423598 +0200
fb7841c8 1530@@ -98,7 +98,7 @@
fa0f2add 1531
fb7841c8
AM
1532 if ((rv = apr_socket_create(newsock,
1533 localsa->family, /* has to match */
1534- SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
1535+ SOCK_STREAM, APR_PROTO_TCP, conn->pool)) != APR_SUCCESS) {
1536 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
1537 "rfc1413: error creating query socket");
1538 return rv;
1539@@ -121,7 +121,7 @@
1540 * addresses from the query socket.
fa0f2add
JB
1541 */
1542
fb7841c8
AM
1543- if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
1544+ if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
1545 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
1546 "rfc1413: Error binding query socket to local port");
1547 apr_socket_close(*newsock);
1548@@ -132,7 +132,7 @@
1549 * errors from connect usually imply the remote machine doesn't support
1550 * the service; don't log such an error
1551 */
1552- if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
1553+ if ((rv = apr_socket_connect(*newsock, destsa)) != APR_SUCCESS) {
1554 apr_socket_close(*newsock);
1555 return rv;
fa0f2add 1556 }
fb7841c8
AM
1557@@ -151,8 +151,8 @@
1558 char user[RFC1413_USERLEN + 1]; /* XXX */
1559 apr_size_t buflen;
fa0f2add 1560
fb7841c8
AM
1561- apr_sockaddr_port_get(&sav_our_port, conn->local_addr);
1562- apr_sockaddr_port_get(&sav_rmt_port, conn->remote_addr);
1563+ sav_our_port = conn->local_addr->port;
1564+ sav_rmt_port = conn->remote_addr->port;
fa0f2add 1565
fb7841c8
AM
1566 /* send the data */
1567 buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port,
1568@@ -164,7 +164,7 @@
1569 while (i < buflen) {
1570 apr_size_t j = strlen(buffer + i);
1571 apr_status_t status;
1572- status = apr_send(sock, buffer+i, &j);
1573+ status = apr_socket_send(sock, buffer+i, &j);
1574 if (status != APR_SUCCESS) {
1575 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1576 "write: rfc1413: error sending request");
1577@@ -190,7 +190,7 @@
1578 while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
1579 apr_size_t j = sizeof(buffer) - 1 - i;
1580 apr_status_t status;
1581- status = apr_recv(sock, buffer+i, &j);
1582+ status = apr_socket_recv(sock, buffer+i, &j);
1583 if (status != APR_SUCCESS) {
1584 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1585 "read: rfc1413: error reading response");
1586diff -ur httpd-2.0.52.org/server/util.c httpd-2.0.52/server/util.c
d72fdc2d
AM
1587--- httpd-2.0.52.org/server/util.c 2004-10-02 18:25:57.284942800 +0200
1588+++ httpd-2.0.52/server/util.c 2004-10-02 18:26:13.716422741 +0200
fb7841c8 1589@@ -1916,7 +1916,7 @@
fa0f2add 1590 {
fb7841c8 1591 apr_finfo_t finfo;
fa0f2add 1592
fb7841c8
AM
1593- if (apr_lstat(&finfo, path, APR_FINFO_TYPE, p) != APR_SUCCESS)
1594+ if (apr_stat(&finfo, path, APR_FINFO_TYPE | APR_FINFO_LINK, p) != APR_SUCCESS)
1595 return 0; /* in error condition, just return no */
fa0f2add 1596
fb7841c8 1597 return (finfo.filetype == APR_DIR);
fb7841c8 1598diff -ur httpd-2.0.52.org/server/util_filter.c httpd-2.0.52/server/util_filter.c
d72fdc2d
AM
1599--- httpd-2.0.52.org/server/util_filter.c 2004-10-02 18:25:57.280943657 +0200
1600+++ httpd-2.0.52/server/util_filter.c 2004-10-02 18:26:13.719422098 +0200
fb7841c8
AM
1601@@ -527,7 +527,7 @@
1602 *saveto = apr_brigade_create(p, f->c->bucket_alloc);
fa0f2add 1603 }
fb7841c8
AM
1604
1605- APR_RING_FOREACH(e, &(*b)->list, apr_bucket, link) {
1606+ for(e = APR_RING_FIRST(&(*b)->list); e != APR_RING_SENTINEL(&(*b)->list, apr_bucket, link); e = APR_RING_NEXT(e, link)) {
1607 rv = apr_bucket_setaside(e, p);
1608 if (rv != APR_SUCCESS
1609 /* ### this ENOTIMPL will go away once we implement setaside
1610diff -ur httpd-2.0.52.org/server/util_md5.c httpd-2.0.52/server/util_md5.c
d72fdc2d
AM
1611--- httpd-2.0.52.org/server/util_md5.c 2004-10-02 18:25:57.294940658 +0200
1612+++ httpd-2.0.52/server/util_md5.c 2004-10-02 18:26:13.721421670 +0200
fb7841c8
AM
1613@@ -53,8 +53,8 @@
1614 {
1615 const char *hex = "0123456789abcdef";
1616 apr_md5_ctx_t my_md5;
1617- unsigned char hash[MD5_DIGESTSIZE];
1618- char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
1619+ unsigned char hash[APR_MD5_DIGESTSIZE];
1620+ char *r, result[33]; /* (APR_MD5_DIGESTSIZE * 2) + 1 */
1621 int i;
fa0f2add 1622
fb7841c8
AM
1623 /*
1624@@ -68,13 +68,13 @@
1625 apr_md5_update(&my_md5, buf, (unsigned int)length);
1626 apr_md5_final(hash, &my_md5);
fa0f2add 1627
fb7841c8
AM
1628- for (i = 0, r = result; i < MD5_DIGESTSIZE; i++) {
1629+ for (i = 0, r = result; i < APR_MD5_DIGESTSIZE; i++) {
1630 *r++ = hex[hash[i] >> 4];
1631 *r++ = hex[hash[i] & 0xF];
fa0f2add 1632 }
fb7841c8 1633 *r = '\0';
fa0f2add 1634
fb7841c8
AM
1635- return apr_pstrndup(p, result, MD5_DIGESTSIZE*2);
1636+ return apr_pstrndup(p, result, APR_MD5_DIGESTSIZE*2);
1637 }
fa0f2add 1638
fb7841c8
AM
1639 AP_DECLARE(char *) ap_md5(apr_pool_t *p, const unsigned char *string)
1640diff -ur httpd-2.0.52.org/server/util_script.c httpd-2.0.52/server/util_script.c
d72fdc2d
AM
1641--- httpd-2.0.52.org/server/util_script.c 2004-10-02 18:25:57.291941301 +0200
1642+++ httpd-2.0.52/server/util_script.c 2004-10-02 18:26:13.812402180 +0200
fb7841c8
AM
1643@@ -236,7 +236,7 @@
1644 apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */
1645 apr_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */
fa0f2add 1646
fb7841c8
AM
1647- apr_sockaddr_port_get(&rport, c->remote_addr);
1648+ rport = c->remote_addr->port;
1649 apr_table_addn(e, "REMOTE_PORT", apr_itoa(r->pool, rport));
1650
1651 if (r->user) {
1652@@ -425,7 +425,7 @@
1653 if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) {
1654 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1655 "Premature end of script headers: %s",
fa0f2add
JB
1656- apr_filename_of_pathname(r->filename));
1657+ apr_filepath_name_get(r->filename));
fb7841c8
AM
1658 return HTTP_INTERNAL_SERVER_ERROR;
1659 }
fa0f2add 1660
fb7841c8 1661@@ -518,7 +518,7 @@
fa0f2add 1662
fb7841c8
AM
1663 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1664 "%s: %s", malformed,
1665- apr_filename_of_pathname(r->filename));
1666+ apr_filepath_name_get(r->filename));
1667 return HTTP_INTERNAL_SERVER_ERROR;
1668 }
fa0f2add 1669
fb7841c8 1670@@ -609,7 +609,7 @@
fa0f2add 1671
fb7841c8
AM
1672 rv = apr_bucket_read(e, &bucket_data, &bucket_data_len,
1673 APR_BLOCK_READ);
1674- if (!APR_STATUS_IS_SUCCESS(rv) || (bucket_data_len == 0)) {
1675+ if ((rv != APR_SUCCESS) || (bucket_data_len == 0)) {
1676 return 0;
fa0f2add 1677 }
fb7841c8
AM
1678 src = bucket_data;
1679diff -ur httpd-2.0.52.org/server/util_time.c httpd-2.0.52/server/util_time.c
d72fdc2d
AM
1680--- httpd-2.0.52.org/server/util_time.c 2004-10-02 18:25:57.282943228 +0200
1681+++ httpd-2.0.52/server/util_time.c 2004-10-02 18:26:13.814401751 +0200
fb7841c8
AM
1682@@ -118,7 +118,7 @@
1683 else {
1684 r = apr_time_exp_lt(xt, t);
fa0f2add 1685 }
fb7841c8
AM
1686- if (!APR_STATUS_IS_SUCCESS(r)) {
1687+ if (r != APR_SUCCESS) {
1688 return r;
fa0f2add 1689 }
fb7841c8
AM
1690 cache_element->t = seconds;
1691diff -ur httpd-2.0.52.org/server/util_xml.c httpd-2.0.52/server/util_xml.c
d72fdc2d
AM
1692--- httpd-2.0.52.org/server/util_xml.c 2004-10-02 18:25:57.283943014 +0200
1693+++ httpd-2.0.52/server/util_xml.c 2004-10-02 18:26:13.817401109 +0200
fb7841c8
AM
1694@@ -56,7 +56,7 @@
1695 goto read_error;
fa0f2add 1696 }
fb7841c8
AM
1697
1698- APR_BRIGADE_FOREACH(bucket, brigade) {
1699+ for(bucket = APR_BRIGADE_FIRST(brigade); bucket != APR_BRIGADE_SENTINEL(brigade); bucket = APR_BUCKET_NEXT(bucket)) {
fa0f2add
JB
1700 const char *data;
1701 apr_size_t len;
1702
fb7841c8 1703diff -ur httpd-2.0.52.org/server/vhost.c httpd-2.0.52/server/vhost.c
d72fdc2d
AM
1704--- httpd-2.0.52.org/server/vhost.c 2004-10-02 18:25:57.285942586 +0200
1705+++ httpd-2.0.52/server/vhost.c 2004-10-02 18:26:13.883386973 +0200
fb7841c8 1706@@ -873,7 +873,7 @@
fa0f2add 1707
fb7841c8 1708 last_s = NULL;
fa0f2add 1709
fb7841c8
AM
1710- apr_sockaddr_port_get(&port, r->connection->local_addr);
1711+ port = r->connection->local_addr->port;
fa0f2add 1712
fb7841c8
AM
1713 /* Recall that the name_chain is a list of server_addr_recs, some of
1714 * whose ports may not match. Also each server may appear more than
1715@@ -929,7 +929,7 @@
1716 name_chain *src;
1717 apr_port_t port;
fa0f2add 1718
fb7841c8
AM
1719- apr_sockaddr_port_get(&port, r->connection->local_addr);
1720+ port = r->connection->local_addr->port;
fa0f2add 1721
fb7841c8
AM
1722 /*
1723 * This is in conjunction with the ServerPath code in http_core, so we
1724@@ -1004,7 +1004,7 @@
1725 /* maybe there's a default server or wildcard name-based vhost
1726 * matching this port
1727 */
1728- apr_sockaddr_port_get(&port, conn->local_addr);
1729+ port = conn->local_addr->port;
fa0f2add 1730
fb7841c8
AM
1731 trav = find_default_server(port);
1732 if (trav) {
1733diff -ur httpd-2.0.52.org/support/ab.c httpd-2.0.52/support/ab.c
d72fdc2d
AM
1734--- httpd-2.0.52.org/support/ab.c 2004-10-02 18:25:58.481686426 +0200
1735+++ httpd-2.0.52/support/ab.c 2004-10-02 18:26:13.888385902 +0200
fb7841c8
AM
1736@@ -721,7 +721,7 @@
1737 }
1738 else
1739 #endif
1740- e = apr_send(c->aprsock, request + c->rwrote, &l);
1741+ e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
fa0f2add 1742
fb7841c8
AM
1743 /*
1744 * Bail early on the most common case
1745@@ -1204,7 +1204,7 @@
1746 apr_pool_create(&c->ctx, cntxt);
fa0f2add 1747
fb7841c8
AM
1748 if ((rv = apr_socket_create(&c->aprsock, destsa->family,
1749- SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
1750+ SOCK_STREAM, APR_PROTO_TCP, c->ctx)) != APR_SUCCESS) {
1751 apr_err("socket", rv);
fa0f2add 1752 }
fb7841c8
AM
1753 if ((rv = apr_socket_opt_set(c->aprsock, APR_SO_NONBLOCK, 1))
1754@@ -1212,7 +1212,7 @@
1755 apr_err("socket nonblock", rv);
1756 }
1757 c->start = apr_time_now();
1758- if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1759+ if ((rv = apr_socket_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1760 if (APR_STATUS_IS_EINPROGRESS(rv)) {
1761 apr_pollfd_t new_pollfd;
1762 c->state = STATE_CONNECTING;
1763@@ -1234,7 +1234,7 @@
1764 if (bad++ > 10) {
1765 fprintf(stderr,
1766 "\nTest aborted after 10 failures\n\n");
1767- apr_err("apr_connect()", rv);
1768+ apr_err("apr_socket_connect()", rv);
fa0f2add 1769 }
fb7841c8
AM
1770 c->state = STATE_UNCONNECTED;
1771 start_connect(c);
1772@@ -1334,7 +1334,7 @@
1773 }
1774 else {
fa0f2add 1775 #endif
fb7841c8
AM
1776- status = apr_recv(c->aprsock, buffer, &r);
1777+ status = apr_socket_recv(c->aprsock, buffer, &r);
1778 if (APR_STATUS_IS_EAGAIN(status))
1779 return;
1780 else if (r == 0 && APR_STATUS_IS_EOF(status)) {
1781@@ -1342,12 +1342,12 @@
1782 close_connection(c);
1783 return;
1784 }
1785- /* catch legitimate fatal apr_recv errors */
1786+ /* catch legitimate fatal apr_socket_recv errors */
1787 else if (status != APR_SUCCESS) {
1788 err_except++; /* XXX: is this the right error counter? */
1789 /* XXX: Should errors here be fatal, or should we allow a
1790 * certain number of them before completely failing? -aaron */
1791- apr_err("apr_recv", status);
1792+ apr_err("apr_socket_recv", status);
1793 }
1794 #ifdef USE_SSL
1795 }
1796@@ -1708,7 +1708,7 @@
1797 if (rv & APR_POLLOUT) {
1798 if (c->state == STATE_CONNECTING) {
1799 apr_pollfd_t remove_pollfd;
1800- rv = apr_connect(c->aprsock, destsa);
1801+ rv = apr_socket_connect(c->aprsock, destsa);
1802 remove_pollfd.desc_type = APR_POLL_SOCKET;
1803 remove_pollfd.desc.s = c->aprsock;
1804 apr_pollset_remove(readbits, &remove_pollfd);
1805@@ -1718,7 +1718,7 @@
1806 if (bad++ > 10) {
1807 fprintf(stderr,
1808 "\nTest aborted after 10 failures\n\n");
1809- apr_err("apr_connect()", rv);
1810+ apr_err("apr_socket_connect()", rv);
1811 }
1812 c->state = STATE_UNCONNECTED;
1813 start_connect(c);
1814diff -ur httpd-2.0.52.org/support/Makefile.in httpd-2.0.52/support/Makefile.in
d72fdc2d
AM
1815--- httpd-2.0.52.org/support/Makefile.in 2004-10-02 18:25:58.494683641 +0200
1816+++ httpd-2.0.52/support/Makefile.in 2004-10-02 18:26:13.890385473 +0200
fb7841c8 1817@@ -51,7 +51,7 @@
fa0f2add 1818
fb7841c8
AM
1819 ab_OBJECTS = ab.lo
1820 ab: $(ab_OBJECTS)
1821- $(LINK) $(ab_LTFLAGS) $(ab_OBJECTS) $(PROGRAM_LDADD)
1822+ $(LINK) $(ab_LTFLAGS) $(ab_OBJECTS) $(PROGRAM_LDADD) -lm
fa0f2add 1823
fb7841c8
AM
1824 checkgid_OBJECTS = checkgid.lo
1825 checkgid: $(checkgid_OBJECTS)
771a85a7
AM
1826diff -ur httpd-2.0.52.org/modules/experimental/util_ldap.c httpd-2.0.52/modules/experimental/util_ldap.c
1827--- httpd-2.0.52.org/modules/experimental/util_ldap.c 2004-10-02 22:10:30.732572635 +0200
1828+++ httpd-2.0.52/modules/experimental/util_ldap.c 2004-10-03 00:59:18.141012892 +0200
1829@@ -42,6 +42,8 @@
1830 #error mod_ldap requires APR-util to have LDAP support built in
1831 #endif
1832
1833+#define const_cast(x) (x)
1834+
1835 /* defines for certificate file types
1836 */
1837 #define LDAP_CA_TYPE_UNKNOWN 0
1838
This page took 0.325741 seconds and 4 git commands to generate.