]> git.pld-linux.org Git - packages/apache.git/blame - apache-apr1.patch
- newer version of perusermpm
[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);
fb7841c8 1078diff -ur httpd-2.0.52.org/server/listen.c httpd-2.0.52/server/listen.c
d72fdc2d
AM
1079--- httpd-2.0.52.org/server/listen.c 2004-10-02 18:25:57.304938516 +0200
1080+++ httpd-2.0.52/server/listen.c 2004-10-02 18:26:13.670432593 +0200
fb7841c8
AM
1081@@ -122,7 +122,7 @@
1082 ap_sock_disable_nagle(s);
1083 #endif
1084
1085- if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
1086+ if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
1087 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
1088 "make_sock: could not bind to address %pI",
1089 server->bind_addr);
1090@@ -130,7 +130,7 @@
1091 return stat;
fa0f2add 1092 }
fa0f2add 1093
fb7841c8
AM
1094- if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
1095+ if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
1096 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
1097 "make_sock: unable to listen for connections "
1098 "on address %pI",
1099@@ -213,10 +213,10 @@
1100 apr_socket_t *tmp_sock;
1101 apr_sockaddr_t *sa;
1102
1103- if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, p))
1104+ if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, APR_PROTO_TCP, p))
1105 == APR_SUCCESS &&
1106 apr_sockaddr_info_get(&sa, NULL, APR_INET6, 0, 0, p) == APR_SUCCESS &&
1107- apr_bind(tmp_sock, sa) == APR_SUCCESS) {
1108+ apr_socket_bind(tmp_sock, sa) == APR_SUCCESS) {
1109 default_family = APR_INET6;
fa0f2add 1110 }
fb7841c8
AM
1111 else {
1112@@ -261,7 +261,7 @@
1113 sa = (*walk)->bind_addr;
1114 /* Some listeners are not real so they will not have a bind_addr. */
1115 if (sa) {
1116- apr_sockaddr_port_get(&oldport, sa);
1117+ oldport = sa->port;
1118 if (!strcmp(sa->hostname, addr) && port == oldport) {
1119 /* re-use existing record */
1120 new = *walk;
1121@@ -286,7 +286,7 @@
fa0f2add 1122 }
fb7841c8
AM
1123 if ((status = apr_socket_create(&new->sd,
1124 new->bind_addr->family,
1125- SOCK_STREAM, process->pool))
1126+ SOCK_STREAM, APR_PROTO_TCP, process->pool))
1127 != APR_SUCCESS) {
1128 ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
1129 "alloc_listener: failed to get a socket for %s", addr);
1130diff -ur httpd-2.0.52.org/server/main.c httpd-2.0.52/server/main.c
d72fdc2d
AM
1131--- httpd-2.0.52.org/server/main.c 2004-10-02 18:25:57.292941087 +0200
1132+++ httpd-2.0.52/server/main.c 2004-10-02 18:26:13.673431951 +0200
fb7841c8
AM
1133@@ -238,7 +238,7 @@
1134 apr_pool_tag(process->pconf, "pconf");
1135 process->argc = argc;
1136 process->argv = argv;
1137- process->short_name = apr_filename_of_pathname(argv[0]);
1138+ process->short_name = apr_filepath_name_get(argv[0]);
1139 return process;
1140 }
1141
1142diff -ur httpd-2.0.52.org/server/mpm/experimental/metuxmpm/metuxmpm.c httpd-2.0.52/server/mpm/experimental/metuxmpm/metuxmpm.c
d72fdc2d
AM
1143--- httpd-2.0.52.org/server/mpm/experimental/metuxmpm/metuxmpm.c 2004-10-02 18:25:57.241952010 +0200
1144+++ httpd-2.0.52/server/mpm/experimental/metuxmpm/metuxmpm.c 2004-10-02 18:26:13.678430880 +0200
fb7841c8
AM
1145@@ -819,7 +819,7 @@
1146 if (workers_may_exit) return APR_SUCCESS;
1147
1148 apr_thread_mutex_lock(pipe_of_death_mutex);
1149- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1150+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1151 if (APR_STATUS_IS_EAGAIN(ret))
1152 {
1153 /* It lost the lottery. It must continue to suffer
1154@@ -975,6 +975,7 @@
1155 while (!workers_may_exit)
1156 {
1157 apr_int16_t event;
1158+ int ifd;
1159
1160 _DBG("loop. conn_id=%d req_max=%d req_remain=%d",
1161 conn_id, ap_max_requests_per_child, requests_this_child);
1162@@ -993,14 +994,18 @@
1163
1164 /* -- setup pollset -- */
1165 /* NOTE: we do _not_ do this upwards anylonger */
1166- apr_poll_setup(&pollset, num_listensocks, tpool);
1167- apr_poll_setup(&pollset, num_listensocks, ptrans);
1168+ pollset = apr_pcalloc(ptrans, sizeof(apr_pollfd_t) * num_listensocks);
1169+ ifd = 0;
1170 for(lr_walk = ap_listeners; lr_walk != NULL; lr_walk = lr_walk->next)
1171 {
1172 int fd;
1173- apr_poll_socket_add(pollset, lr_walk->sd, APR_POLLIN);
1174+ pollset[ifd].p = ptrans;
1175+ pollset[ifd].desc.s = lr_walk->sd;
1176+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1177+ pollset[ifd].reqevents = APR_POLLIN;
1178 apr_os_sock_get(&fd, lr_walk->sd);
1179 _DBG("adding fd %d to pollset", fd);
1180+ ifd++;
fa0f2add 1181 }
fa0f2add 1182
fb7841c8
AM
1183 if (workers_may_exit) goto worker_out;
1184@@ -1032,10 +1037,13 @@
1185 _DBG("looking for an listener",0);
1186 for (lr_walk=ap_listeners; lr_walk!=NULL; lr_walk = lr_walk->next)
1187 {
1188- int fd_tmp;
1189+ int fd_tmp, fdt;
1190 apr_os_sock_get(&fd_tmp, lr_walk->sd);
1191 _DBG(" ... trying w/ fd=%d", fd_tmp);
1192- apr_poll_revents_get(&event, lr_walk->sd, pollset);
1193+ for(fdt = 0; fdt < num_listensocks; fdt++)
1194+ if(pollset[fdt].desc.s == lr_walk->sd)
1195+ break;
1196+ event = pollset[fdt].rtnevents;
1197 if (event & (APR_POLLIN))
1198 {
1199 THREAD_ACCEPT_UNLOCK;
1200@@ -1588,7 +1596,7 @@
1201 }
1202 #if APR_HAS_OTHER_CHILD
fa0f2add 1203 }
fb7841c8
AM
1204- else if (apr_proc_other_child_read(&pid, status) == 0)
1205+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0)
1206 {
1207 /* handled */
1208 #endif
1209diff -ur httpd-2.0.52.org/server/mpm/experimental/perchild/perchild.c httpd-2.0.52/server/mpm/experimental/perchild/perchild.c
d72fdc2d
AM
1210--- httpd-2.0.52.org/server/mpm/experimental/perchild/perchild.c 2004-10-02 18:25:57.234953509 +0200
1211+++ httpd-2.0.52/server/mpm/experimental/perchild/perchild.c 2004-10-02 18:26:13.682430023 +0200
fb7841c8
AM
1212@@ -552,7 +552,7 @@
1213 char pipe_read_char;
1214 apr_size_t n = 1;
1215
1216- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1217+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1218 if (APR_STATUS_IS_EAGAIN(ret)) {
1219 /* It lost the lottery. It must continue to suffer
1220 * through a life of servitude. */
1221@@ -643,7 +643,7 @@
1222 apr_pollfd_t *pollset;
1223 apr_status_t rv;
1224 ap_listen_rec *lr, *last_lr = ap_listeners;
1225- int n;
1226+ int n, ifd;
1227 apr_bucket_alloc_t *bucket_alloc;
1228
1229 apr_thread_mutex_lock(thread_pool_parent_mutex);
1230@@ -657,10 +657,15 @@
1231
1232 bucket_alloc = apr_bucket_alloc_create(apr_thread_pool_get(thd));
1233
1234- apr_poll_setup(&pollset, num_listensocks, tpool);
1235+ pollset = apr_pcalloc(tpool, sizeof(apr_pollfd_t) * num_listensocks);
1236+ ifd = 0;
1237 for(lr = ap_listeners; lr != NULL; lr = lr->next) {
1238 int fd;
1239- apr_poll_socket_add(pollset, lr->sd, APR_POLLIN);
1240+ pollset[ifd].p = tpool;
1241+ pollset[ifd].desc.s = lr->sd;
1242+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1243+ pollset[ifd].reqevents = APR_POLLIN;
1244+ ifd++;
1245
1246 apr_os_sock_get(&fd, lr->sd);
fa0f2add 1247 }
fb7841c8
AM
1248@@ -726,7 +731,10 @@
1249 lr = ap_listeners;
1250 }
1251 /* XXX: Should we check for POLLERR? */
1252- apr_poll_revents_get(&event, lr->sd, pollset);
1253+ for(ifd = 0; ifd < num_listensocks; ifd++)
1254+ if(pollset[ifd].desc.s == lr->sd)
1255+ break;
1256+ event = pollset[ifd].rtnevents;
1257 if (event & (APR_POLLIN)) {
1258 last_lr = lr;
1259 goto got_fd;
1260@@ -1170,7 +1178,7 @@
1261 }
1262 #if APR_HAS_OTHER_CHILD
1263 }
1264- else if (apr_proc_other_child_read(&pid, status) == 0) {
1265+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1266 /* handled */
1267 #endif
1268 }
1269diff -ur httpd-2.0.52.org/server/mpm/experimental/peruser/peruser.c httpd-2.0.52/server/mpm/experimental/peruser/peruser.c
d72fdc2d
AM
1270--- httpd-2.0.52.org/server/mpm/experimental/peruser/peruser.c 2004-10-02 18:25:57.245951153 +0200
1271+++ httpd-2.0.52/server/mpm/experimental/peruser/peruser.c 2004-10-02 18:26:13.687428952 +0200
fb7841c8
AM
1272@@ -625,7 +625,7 @@
1273 if (die_now) return APR_SUCCESS;
1274
1275 /* apr_thread_mutex_lock(pipe_of_death_mutex); */
1276- ret = apr_recv(lr->sd, &pipe_read_char, &n);
1277+ ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
1278 if (APR_STATUS_IS_EAGAIN(ret))
1279 {
1280 /* It lost the lottery. It must continue to suffer
1281@@ -1985,7 +1985,7 @@
1282 }
1283 #if APR_HAS_OTHER_CHILD
1284 }
1285- else if (apr_proc_other_child_read(&pid, status) == 0) {
1286+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1287 _DBG("APR_HAS_OTHER_CHILD, apparently", 0);
1288 /* handled */
1289 #endif
1290diff -ur httpd-2.0.52.org/server/mpm/prefork/prefork.c httpd-2.0.52/server/mpm/prefork/prefork.c
d72fdc2d
AM
1291--- httpd-2.0.52.org/server/mpm/prefork/prefork.c 2004-10-02 18:25:57.273945156 +0200
1292+++ httpd-2.0.52/server/mpm/prefork/prefork.c 2004-10-02 18:26:13.691428095 +0200
fb7841c8
AM
1293@@ -1002,7 +1002,7 @@
1294 }
1295 #if APR_HAS_OTHER_CHILD
1296 }
1297- else if (apr_proc_other_child_read(&pid, status) == 0) {
1298+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1299 /* handled */
1300 #endif
1301 }
1302diff -ur httpd-2.0.52.org/server/mpm/worker/pod.c httpd-2.0.52/server/mpm/worker/pod.c
d72fdc2d
AM
1303--- httpd-2.0.52.org/server/mpm/worker/pod.c 2004-10-02 18:25:57.245951153 +0200
1304+++ httpd-2.0.52/server/mpm/worker/pod.c 2004-10-02 18:26:13.693427667 +0200
fb7841c8
AM
1305@@ -34,8 +34,8 @@
1306 (*pod)->p = p;
1307
1308 /* close these before exec. */
1309- apr_file_unset_inherit((*pod)->pod_in);
1310- apr_file_unset_inherit((*pod)->pod_out);
1311+ apr_file_inherit_unset((*pod)->pod_in);
1312+ apr_file_inherit_unset((*pod)->pod_out);
1313
1314 return APR_SUCCESS;
1315 }
1316diff -ur httpd-2.0.52.org/server/mpm/worker/worker.c httpd-2.0.52/server/mpm/worker/worker.c
d72fdc2d
AM
1317--- httpd-2.0.52.org/server/mpm/worker/worker.c 2004-10-02 18:25:57.269946013 +0200
1318+++ httpd-2.0.52/server/mpm/worker/worker.c 2004-10-02 18:26:13.697426810 +0200
fb7841c8
AM
1319@@ -578,13 +578,19 @@
1320 apr_pollfd_t *pollset;
1321 apr_status_t rv;
1322 ap_listen_rec *lr, *last_lr = ap_listeners;
1323- int have_idle_worker = 0;
1324+ int have_idle_worker = 0, ifd;
1325
1326 free(ti);
1327
1328- apr_poll_setup(&pollset, num_listensocks, tpool);
1329- for(lr = ap_listeners ; lr != NULL ; lr = lr->next)
1330- apr_poll_socket_add(pollset, lr->sd, APR_POLLIN);
1331+ pollset = apr_pcalloc(tpool, sizeof(apr_pollfd_t) * num_listensocks);
1332+ ifd = 0;
1333+ for(lr = ap_listeners ; lr != NULL ; lr = lr->next) {
1334+ pollset[ifd].p = tpool;
1335+ pollset[ifd].desc.s = lr->sd;
1336+ pollset[ifd].desc_type = APR_POLL_SOCKET;
1337+ pollset[ifd].reqevents = APR_POLLIN;
1338+ ifd++;
1339+ }
1340
1341 /* Unblock the signal used to wake this thread up, and set a handler for
1342 * it.
1343@@ -670,7 +676,10 @@
1344 lr = ap_listeners;
1345 }
1346 /* XXX: Should we check for POLLERR? */
1347- apr_poll_revents_get(&event, lr->sd, pollset);
1348+ for(ifd = 0; ifd < num_listensocks; ifd++)
1349+ if(pollset[ifd].desc.s == lr->sd)
1350+ break;
1351+ event = pollset[ifd].rtnevents;
1352 if (event & APR_POLLIN) {
1353 last_lr = lr;
1354 goto got_fd;
1355@@ -1500,7 +1509,7 @@
1356 }
1357 #if APR_HAS_OTHER_CHILD
1358 }
1359- else if (apr_proc_other_child_read(&pid, status) == 0) {
1360+ else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH, status) == 0) {
1361 /* handled */
1362 #endif
1363 }
fb7841c8 1364diff -ur httpd-2.0.52.org/server/protocol.c httpd-2.0.52/server/protocol.c
d72fdc2d
AM
1365--- httpd-2.0.52.org/server/protocol.c 2004-10-02 18:25:57.276944514 +0200
1366+++ httpd-2.0.52/server/protocol.c 2004-10-02 18:26:13.704425311 +0200
fb7841c8
AM
1367@@ -223,7 +223,7 @@
1368 return APR_EGENERAL;
1369 }
fa0f2add 1370
fb7841c8
AM
1371- APR_BRIGADE_FOREACH(e, bb) {
1372+ for(e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) {
1373 const char *str;
1374 apr_size_t len;
fa0f2add 1375
fb7841c8 1376diff -ur httpd-2.0.52.org/server/request.c httpd-2.0.52/server/request.c
d72fdc2d
AM
1377--- httpd-2.0.52.org/server/request.c 2004-10-02 18:25:57.281943443 +0200
1378+++ httpd-2.0.52/server/request.c 2004-10-02 18:26:13.709424240 +0200
fb7841c8
AM
1379@@ -375,7 +375,7 @@
1380 * owner of the symlink, then get the info of the target.
1381 */
1382 if (!(lfi->valid & APR_FINFO_OWNER)) {
1383- if ((res = apr_lstat(&fi, d, lfi->valid | APR_FINFO_OWNER, p))
1384+ if ((res = apr_stat(&fi, d, lfi->valid | APR_FINFO_OWNER | APR_FINFO_LINK, p))
1385 != APR_SUCCESS) {
1386 return HTTP_FORBIDDEN;
fa0f2add 1387 }
fb7841c8
AM
1388@@ -386,7 +386,7 @@
1389 return HTTP_FORBIDDEN;
fa0f2add 1390 }
fa0f2add 1391
fb7841c8
AM
1392- if (apr_compare_users(fi.user, lfi->user) != APR_SUCCESS) {
1393+ if (apr_uid_compare(fi.user, lfi->user) != APR_SUCCESS) {
1394 return HTTP_FORBIDDEN;
1395 }
1396
1397@@ -763,7 +763,7 @@
1398 && ((entry_core->d_components < seg)
1399 || (entry_core->d_is_fnmatch
1400 ? (apr_fnmatch(entry_core->d, r->filename,
1401- FNM_PATHNAME) != APR_SUCCESS)
1402+ APR_FNM_PATHNAME) != APR_SUCCESS)
1403 : (strcmp(r->filename, entry_core->d) != 0)))) {
1404 continue;
fa0f2add 1405 }
fb7841c8
AM
1406@@ -939,8 +939,8 @@
1407 * want the name of this 'link' object, not the name of its
1408 * target, if we are fixing the filename case/resolving aliases.
1409 */
1410- rv = apr_lstat(&thisinfo, r->filename,
1411- APR_FINFO_MIN | APR_FINFO_NAME, r->pool);
1412+ rv = apr_stat(&thisinfo, r->filename,
1413+ APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK, r->pool);
fa0f2add 1414
fb7841c8
AM
1415 if (APR_STATUS_IS_ENOENT(rv)) {
1416 /* Nothing? That could be nice. But our directory
1417@@ -1230,7 +1230,7 @@
1418 if (entry_core->r
1419 ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0)
1420 : (entry_core->d_is_fnmatch
1421- ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
1422+ ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1423 : (strncmp(entry_core->d, cache->cached, len)
1424 || (entry_core->d[len - 1] != '/'
1425 && cache->cached[len] != '/'
1426@@ -1379,7 +1379,7 @@
1427 if (entry_core->r
1428 ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
1429 : (entry_core->d_is_fnmatch
1430- ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
1431+ ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
1432 : strcmp(entry_core->d, cache->cached))) {
1433 continue;
fa0f2add 1434 }
fb7841c8 1435@@ -1690,8 +1690,8 @@
fa0f2add 1436 }
fb7841c8
AM
1437 }
1438 else {
1439- if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
1440- APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
1441+ if (((rv = apr_stat(&rnew->finfo, rnew->filename,
1442+ APR_FINFO_MIN | APR_FINFO_LINK, rnew->pool)) != APR_SUCCESS)
1443 && (rv != APR_INCOMPLETE)) {
1444 rnew->finfo.filetype = 0;
1445 }
1446@@ -1795,8 +1795,8 @@
1447 }
1448 }
1449 else {
1450- if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
1451- APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
1452+ if (((rv = apr_stat(&rnew->finfo, rnew->filename,
1453+ APR_FINFO_MIN | APR_FINFO_LINK, rnew->pool)) != APR_SUCCESS)
1454 && (rv != APR_INCOMPLETE)) {
1455 rnew->finfo.filetype = 0;
1456 }
1457diff -ur httpd-2.0.52.org/server/rfc1413.c httpd-2.0.52/server/rfc1413.c
d72fdc2d
AM
1458--- httpd-2.0.52.org/server/rfc1413.c 2004-10-02 18:25:57.274944942 +0200
1459+++ httpd-2.0.52/server/rfc1413.c 2004-10-02 18:26:13.712423598 +0200
fb7841c8 1460@@ -98,7 +98,7 @@
fa0f2add 1461
fb7841c8
AM
1462 if ((rv = apr_socket_create(newsock,
1463 localsa->family, /* has to match */
1464- SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
1465+ SOCK_STREAM, APR_PROTO_TCP, conn->pool)) != APR_SUCCESS) {
1466 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
1467 "rfc1413: error creating query socket");
1468 return rv;
1469@@ -121,7 +121,7 @@
1470 * addresses from the query socket.
fa0f2add
JB
1471 */
1472
fb7841c8
AM
1473- if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
1474+ if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
1475 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
1476 "rfc1413: Error binding query socket to local port");
1477 apr_socket_close(*newsock);
1478@@ -132,7 +132,7 @@
1479 * errors from connect usually imply the remote machine doesn't support
1480 * the service; don't log such an error
1481 */
1482- if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
1483+ if ((rv = apr_socket_connect(*newsock, destsa)) != APR_SUCCESS) {
1484 apr_socket_close(*newsock);
1485 return rv;
fa0f2add 1486 }
fb7841c8
AM
1487@@ -151,8 +151,8 @@
1488 char user[RFC1413_USERLEN + 1]; /* XXX */
1489 apr_size_t buflen;
fa0f2add 1490
fb7841c8
AM
1491- apr_sockaddr_port_get(&sav_our_port, conn->local_addr);
1492- apr_sockaddr_port_get(&sav_rmt_port, conn->remote_addr);
1493+ sav_our_port = conn->local_addr->port;
1494+ sav_rmt_port = conn->remote_addr->port;
fa0f2add 1495
fb7841c8
AM
1496 /* send the data */
1497 buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port,
1498@@ -164,7 +164,7 @@
1499 while (i < buflen) {
1500 apr_size_t j = strlen(buffer + i);
1501 apr_status_t status;
1502- status = apr_send(sock, buffer+i, &j);
1503+ status = apr_socket_send(sock, buffer+i, &j);
1504 if (status != APR_SUCCESS) {
1505 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1506 "write: rfc1413: error sending request");
1507@@ -190,7 +190,7 @@
1508 while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
1509 apr_size_t j = sizeof(buffer) - 1 - i;
1510 apr_status_t status;
1511- status = apr_recv(sock, buffer+i, &j);
1512+ status = apr_socket_recv(sock, buffer+i, &j);
1513 if (status != APR_SUCCESS) {
1514 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1515 "read: rfc1413: error reading response");
1516diff -ur httpd-2.0.52.org/server/util.c httpd-2.0.52/server/util.c
d72fdc2d
AM
1517--- httpd-2.0.52.org/server/util.c 2004-10-02 18:25:57.284942800 +0200
1518+++ httpd-2.0.52/server/util.c 2004-10-02 18:26:13.716422741 +0200
fb7841c8 1519@@ -1916,7 +1916,7 @@
fa0f2add 1520 {
fb7841c8 1521 apr_finfo_t finfo;
fa0f2add 1522
fb7841c8
AM
1523- if (apr_lstat(&finfo, path, APR_FINFO_TYPE, p) != APR_SUCCESS)
1524+ if (apr_stat(&finfo, path, APR_FINFO_TYPE | APR_FINFO_LINK, p) != APR_SUCCESS)
1525 return 0; /* in error condition, just return no */
fa0f2add 1526
fb7841c8 1527 return (finfo.filetype == APR_DIR);
fb7841c8 1528diff -ur httpd-2.0.52.org/server/util_filter.c httpd-2.0.52/server/util_filter.c
d72fdc2d
AM
1529--- httpd-2.0.52.org/server/util_filter.c 2004-10-02 18:25:57.280943657 +0200
1530+++ httpd-2.0.52/server/util_filter.c 2004-10-02 18:26:13.719422098 +0200
fb7841c8
AM
1531@@ -527,7 +527,7 @@
1532 *saveto = apr_brigade_create(p, f->c->bucket_alloc);
fa0f2add 1533 }
fb7841c8
AM
1534
1535- APR_RING_FOREACH(e, &(*b)->list, apr_bucket, link) {
1536+ for(e = APR_RING_FIRST(&(*b)->list); e != APR_RING_SENTINEL(&(*b)->list, apr_bucket, link); e = APR_RING_NEXT(e, link)) {
1537 rv = apr_bucket_setaside(e, p);
1538 if (rv != APR_SUCCESS
1539 /* ### this ENOTIMPL will go away once we implement setaside
1540diff -ur httpd-2.0.52.org/server/util_md5.c httpd-2.0.52/server/util_md5.c
d72fdc2d
AM
1541--- httpd-2.0.52.org/server/util_md5.c 2004-10-02 18:25:57.294940658 +0200
1542+++ httpd-2.0.52/server/util_md5.c 2004-10-02 18:26:13.721421670 +0200
fb7841c8
AM
1543@@ -53,8 +53,8 @@
1544 {
1545 const char *hex = "0123456789abcdef";
1546 apr_md5_ctx_t my_md5;
1547- unsigned char hash[MD5_DIGESTSIZE];
1548- char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
1549+ unsigned char hash[APR_MD5_DIGESTSIZE];
1550+ char *r, result[33]; /* (APR_MD5_DIGESTSIZE * 2) + 1 */
1551 int i;
fa0f2add 1552
fb7841c8
AM
1553 /*
1554@@ -68,13 +68,13 @@
1555 apr_md5_update(&my_md5, buf, (unsigned int)length);
1556 apr_md5_final(hash, &my_md5);
fa0f2add 1557
fb7841c8
AM
1558- for (i = 0, r = result; i < MD5_DIGESTSIZE; i++) {
1559+ for (i = 0, r = result; i < APR_MD5_DIGESTSIZE; i++) {
1560 *r++ = hex[hash[i] >> 4];
1561 *r++ = hex[hash[i] & 0xF];
fa0f2add 1562 }
fb7841c8 1563 *r = '\0';
fa0f2add 1564
fb7841c8
AM
1565- return apr_pstrndup(p, result, MD5_DIGESTSIZE*2);
1566+ return apr_pstrndup(p, result, APR_MD5_DIGESTSIZE*2);
1567 }
fa0f2add 1568
fb7841c8
AM
1569 AP_DECLARE(char *) ap_md5(apr_pool_t *p, const unsigned char *string)
1570diff -ur httpd-2.0.52.org/server/util_script.c httpd-2.0.52/server/util_script.c
d72fdc2d
AM
1571--- httpd-2.0.52.org/server/util_script.c 2004-10-02 18:25:57.291941301 +0200
1572+++ httpd-2.0.52/server/util_script.c 2004-10-02 18:26:13.812402180 +0200
fb7841c8
AM
1573@@ -236,7 +236,7 @@
1574 apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */
1575 apr_table_addn(e, "SCRIPT_FILENAME", r->filename); /* Apache */
fa0f2add 1576
fb7841c8
AM
1577- apr_sockaddr_port_get(&rport, c->remote_addr);
1578+ rport = c->remote_addr->port;
1579 apr_table_addn(e, "REMOTE_PORT", apr_itoa(r->pool, rport));
1580
1581 if (r->user) {
1582@@ -425,7 +425,7 @@
1583 if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) {
1584 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1585 "Premature end of script headers: %s",
fa0f2add
JB
1586- apr_filename_of_pathname(r->filename));
1587+ apr_filepath_name_get(r->filename));
fb7841c8
AM
1588 return HTTP_INTERNAL_SERVER_ERROR;
1589 }
fa0f2add 1590
fb7841c8 1591@@ -518,7 +518,7 @@
fa0f2add 1592
fb7841c8
AM
1593 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1594 "%s: %s", malformed,
1595- apr_filename_of_pathname(r->filename));
1596+ apr_filepath_name_get(r->filename));
1597 return HTTP_INTERNAL_SERVER_ERROR;
1598 }
fa0f2add 1599
fb7841c8 1600@@ -609,7 +609,7 @@
fa0f2add 1601
fb7841c8
AM
1602 rv = apr_bucket_read(e, &bucket_data, &bucket_data_len,
1603 APR_BLOCK_READ);
1604- if (!APR_STATUS_IS_SUCCESS(rv) || (bucket_data_len == 0)) {
1605+ if ((rv != APR_SUCCESS) || (bucket_data_len == 0)) {
1606 return 0;
fa0f2add 1607 }
fb7841c8
AM
1608 src = bucket_data;
1609diff -ur httpd-2.0.52.org/server/util_time.c httpd-2.0.52/server/util_time.c
d72fdc2d
AM
1610--- httpd-2.0.52.org/server/util_time.c 2004-10-02 18:25:57.282943228 +0200
1611+++ httpd-2.0.52/server/util_time.c 2004-10-02 18:26:13.814401751 +0200
fb7841c8
AM
1612@@ -118,7 +118,7 @@
1613 else {
1614 r = apr_time_exp_lt(xt, t);
fa0f2add 1615 }
fb7841c8
AM
1616- if (!APR_STATUS_IS_SUCCESS(r)) {
1617+ if (r != APR_SUCCESS) {
1618 return r;
fa0f2add 1619 }
fb7841c8
AM
1620 cache_element->t = seconds;
1621diff -ur httpd-2.0.52.org/server/util_xml.c httpd-2.0.52/server/util_xml.c
d72fdc2d
AM
1622--- httpd-2.0.52.org/server/util_xml.c 2004-10-02 18:25:57.283943014 +0200
1623+++ httpd-2.0.52/server/util_xml.c 2004-10-02 18:26:13.817401109 +0200
fb7841c8
AM
1624@@ -56,7 +56,7 @@
1625 goto read_error;
fa0f2add 1626 }
fb7841c8
AM
1627
1628- APR_BRIGADE_FOREACH(bucket, brigade) {
1629+ for(bucket = APR_BRIGADE_FIRST(brigade); bucket != APR_BRIGADE_SENTINEL(brigade); bucket = APR_BUCKET_NEXT(bucket)) {
fa0f2add
JB
1630 const char *data;
1631 apr_size_t len;
1632
fb7841c8 1633diff -ur httpd-2.0.52.org/server/vhost.c httpd-2.0.52/server/vhost.c
d72fdc2d
AM
1634--- httpd-2.0.52.org/server/vhost.c 2004-10-02 18:25:57.285942586 +0200
1635+++ httpd-2.0.52/server/vhost.c 2004-10-02 18:26:13.883386973 +0200
fb7841c8 1636@@ -873,7 +873,7 @@
fa0f2add 1637
fb7841c8 1638 last_s = NULL;
fa0f2add 1639
fb7841c8
AM
1640- apr_sockaddr_port_get(&port, r->connection->local_addr);
1641+ port = r->connection->local_addr->port;
fa0f2add 1642
fb7841c8
AM
1643 /* Recall that the name_chain is a list of server_addr_recs, some of
1644 * whose ports may not match. Also each server may appear more than
1645@@ -929,7 +929,7 @@
1646 name_chain *src;
1647 apr_port_t port;
fa0f2add 1648
fb7841c8
AM
1649- apr_sockaddr_port_get(&port, r->connection->local_addr);
1650+ port = r->connection->local_addr->port;
fa0f2add 1651
fb7841c8
AM
1652 /*
1653 * This is in conjunction with the ServerPath code in http_core, so we
1654@@ -1004,7 +1004,7 @@
1655 /* maybe there's a default server or wildcard name-based vhost
1656 * matching this port
1657 */
1658- apr_sockaddr_port_get(&port, conn->local_addr);
1659+ port = conn->local_addr->port;
fa0f2add 1660
fb7841c8
AM
1661 trav = find_default_server(port);
1662 if (trav) {
1663diff -ur httpd-2.0.52.org/support/ab.c httpd-2.0.52/support/ab.c
d72fdc2d
AM
1664--- httpd-2.0.52.org/support/ab.c 2004-10-02 18:25:58.481686426 +0200
1665+++ httpd-2.0.52/support/ab.c 2004-10-02 18:26:13.888385902 +0200
fb7841c8
AM
1666@@ -721,7 +721,7 @@
1667 }
1668 else
1669 #endif
1670- e = apr_send(c->aprsock, request + c->rwrote, &l);
1671+ e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
fa0f2add 1672
fb7841c8
AM
1673 /*
1674 * Bail early on the most common case
1675@@ -1204,7 +1204,7 @@
1676 apr_pool_create(&c->ctx, cntxt);
fa0f2add 1677
fb7841c8
AM
1678 if ((rv = apr_socket_create(&c->aprsock, destsa->family,
1679- SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
1680+ SOCK_STREAM, APR_PROTO_TCP, c->ctx)) != APR_SUCCESS) {
1681 apr_err("socket", rv);
fa0f2add 1682 }
fb7841c8
AM
1683 if ((rv = apr_socket_opt_set(c->aprsock, APR_SO_NONBLOCK, 1))
1684@@ -1212,7 +1212,7 @@
1685 apr_err("socket nonblock", rv);
1686 }
1687 c->start = apr_time_now();
1688- if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1689+ if ((rv = apr_socket_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1690 if (APR_STATUS_IS_EINPROGRESS(rv)) {
1691 apr_pollfd_t new_pollfd;
1692 c->state = STATE_CONNECTING;
1693@@ -1234,7 +1234,7 @@
1694 if (bad++ > 10) {
1695 fprintf(stderr,
1696 "\nTest aborted after 10 failures\n\n");
1697- apr_err("apr_connect()", rv);
1698+ apr_err("apr_socket_connect()", rv);
fa0f2add 1699 }
fb7841c8
AM
1700 c->state = STATE_UNCONNECTED;
1701 start_connect(c);
1702@@ -1334,7 +1334,7 @@
1703 }
1704 else {
fa0f2add 1705 #endif
fb7841c8
AM
1706- status = apr_recv(c->aprsock, buffer, &r);
1707+ status = apr_socket_recv(c->aprsock, buffer, &r);
1708 if (APR_STATUS_IS_EAGAIN(status))
1709 return;
1710 else if (r == 0 && APR_STATUS_IS_EOF(status)) {
1711@@ -1342,12 +1342,12 @@
1712 close_connection(c);
1713 return;
1714 }
1715- /* catch legitimate fatal apr_recv errors */
1716+ /* catch legitimate fatal apr_socket_recv errors */
1717 else if (status != APR_SUCCESS) {
1718 err_except++; /* XXX: is this the right error counter? */
1719 /* XXX: Should errors here be fatal, or should we allow a
1720 * certain number of them before completely failing? -aaron */
1721- apr_err("apr_recv", status);
1722+ apr_err("apr_socket_recv", status);
1723 }
1724 #ifdef USE_SSL
1725 }
1726@@ -1708,7 +1708,7 @@
1727 if (rv & APR_POLLOUT) {
1728 if (c->state == STATE_CONNECTING) {
1729 apr_pollfd_t remove_pollfd;
1730- rv = apr_connect(c->aprsock, destsa);
1731+ rv = apr_socket_connect(c->aprsock, destsa);
1732 remove_pollfd.desc_type = APR_POLL_SOCKET;
1733 remove_pollfd.desc.s = c->aprsock;
1734 apr_pollset_remove(readbits, &remove_pollfd);
1735@@ -1718,7 +1718,7 @@
1736 if (bad++ > 10) {
1737 fprintf(stderr,
1738 "\nTest aborted after 10 failures\n\n");
1739- apr_err("apr_connect()", rv);
1740+ apr_err("apr_socket_connect()", rv);
1741 }
1742 c->state = STATE_UNCONNECTED;
1743 start_connect(c);
1744diff -ur httpd-2.0.52.org/support/Makefile.in httpd-2.0.52/support/Makefile.in
d72fdc2d
AM
1745--- httpd-2.0.52.org/support/Makefile.in 2004-10-02 18:25:58.494683641 +0200
1746+++ httpd-2.0.52/support/Makefile.in 2004-10-02 18:26:13.890385473 +0200
fb7841c8 1747@@ -51,7 +51,7 @@
fa0f2add 1748
fb7841c8
AM
1749 ab_OBJECTS = ab.lo
1750 ab: $(ab_OBJECTS)
1751- $(LINK) $(ab_LTFLAGS) $(ab_OBJECTS) $(PROGRAM_LDADD)
1752+ $(LINK) $(ab_LTFLAGS) $(ab_OBJECTS) $(PROGRAM_LDADD) -lm
fa0f2add 1753
fb7841c8
AM
1754 checkgid_OBJECTS = checkgid.lo
1755 checkgid: $(checkgid_OBJECTS)
771a85a7
AM
1756diff -ur httpd-2.0.52.org/modules/experimental/util_ldap.c httpd-2.0.52/modules/experimental/util_ldap.c
1757--- httpd-2.0.52.org/modules/experimental/util_ldap.c 2004-10-02 22:10:30.732572635 +0200
1758+++ httpd-2.0.52/modules/experimental/util_ldap.c 2004-10-03 00:59:18.141012892 +0200
1759@@ -42,6 +42,8 @@
1760 #error mod_ldap requires APR-util to have LDAP support built in
1761 #endif
1762
1763+#define const_cast(x) (x)
1764+
1765 /* defines for certificate file types
1766 */
1767 #define LDAP_CA_TYPE_UNKNOWN 0
1768
656b38d1
SP
1769--- httpd-2.0.54/server/mpm_common.c 2005-03-30 09:42:15.000000000 +0000
1770+++ httpd-2.0.54.new/server/mpm_common.c 2005-04-18 07:11:07.869583928 +0000
1771@@ -252,7 +252,7 @@
1772 }
1773
1774 #if APR_HAS_OTHER_CHILD
1775- apr_proc_other_child_check();
1776+ apr_proc_other_child_refresh_all(APR_OC_REASON_RESTART);
1777 #endif
1778
1779 } while (not_dead_yet > 0 &&
1780@@ -466,8 +466,8 @@
1781 (*pod)->p = p;
1782
1783 /* close these before exec. */
1784- apr_file_unset_inherit((*pod)->pod_in);
1785- apr_file_unset_inherit((*pod)->pod_out);
1786+ apr_file_inherit_unset((*pod)->pod_in);
1787+ apr_file_inherit_unset((*pod)->pod_out);
1788
1789 return APR_SUCCESS;
1790 }
1791@@ -540,7 +540,7 @@
1792 return rv;
1793 }
1794
1795- rv = apr_socket_create(&sock, ap_listeners->bind_addr->family, SOCK_STREAM, p);
2d12bfe2 1796+ rv = apr_socket_create(&sock, ap_listeners->bind_addr->family, SOCK_STREAM, APR_PROTO_TCP, p);
656b38d1
SP
1797 if (rv != APR_SUCCESS) {
1798 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
1799 "get socket to connect to listener");
1800@@ -561,7 +561,7 @@
1801 return rv;
1802 }
1803
1804- rv = apr_connect(sock, ap_listeners->bind_addr);
2d12bfe2 1805+ rv = apr_socket_connect(sock, ap_listeners->bind_addr);
656b38d1
SP
1806 if (rv != APR_SUCCESS) {
1807 int log_level = APLOG_WARNING;
1808
This page took 0.248931 seconds and 4 git commands to generate.