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