1 diff -urN httpd-2.0.47.org/include/ap_compat.h httpd-2.0.47/include/ap_compat.h
2 --- httpd-2.0.47.org/include/ap_compat.h 2003-09-13 14:18:37.000000000 +0200
3 +++ httpd-2.0.47/include/ap_compat.h 2003-09-13 22:36:19.000000000 +0200
8 -/* Drag in apu (and therefore apr) renamed symbols */
9 -#include "apu_compat.h"
11 /* redefine 1.3.x symbols to the new symbol names */
13 #define MODULE_VAR_EXPORT AP_MODULE_DECLARE_DATA
14 diff -urN httpd-2.0.47.org/modules/arch/netware/mod_netware.c httpd-2.0.47/modules/arch/netware/mod_netware.c
15 --- httpd-2.0.47.org/modules/arch/netware/mod_netware.c 2003-09-13 14:18:35.000000000 +0200
16 +++ httpd-2.0.47/modules/arch/netware/mod_netware.c 2003-09-13 22:41:53.000000000 +0200
20 /* Figure out what the extension is so that we can matche it. */
21 - ext = strrchr(apr_filename_of_pathname(cmd_only), '.');
22 + ext = strrchr(apr_filepath_name_get(cmd_only), '.');
24 /* If there isn't an extension then give it an empty string */
26 diff -urN httpd-2.0.47.org/modules/arch/win32/mod_isapi.c httpd-2.0.47/modules/arch/win32/mod_isapi.c
27 --- httpd-2.0.47.org/modules/arch/win32/mod_isapi.c 2003-09-13 14:18:35.000000000 +0200
28 +++ httpd-2.0.47/modules/arch/win32/mod_isapi.c 2003-09-15 20:34:54.000000000 +0200
33 - apr_pool_sub_make(&loaded.pool, pconf, NULL);
34 + apr_pool_create_ex(&loaded.pool, pconf, NULL, NULL);
36 ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, NULL,
37 "ISAPI: could not create the isapi cache pool");
38 diff -urN httpd-2.0.47.org/modules/arch/win32/mod_win32.c httpd-2.0.47/modules/arch/win32/mod_win32.c
39 --- httpd-2.0.47.org/modules/arch/win32/mod_win32.c 2003-09-13 14:18:35.000000000 +0200
40 +++ httpd-2.0.47/modules/arch/win32/mod_win32.c 2003-09-13 22:41:53.000000000 +0200
42 * win32 parsing here, therefore the final extension is the only one
45 - ext = strrchr(apr_filename_of_pathname(*cmd), '.');
46 + ext = strrchr(apr_filepath_name_get(*cmd), '.');
48 /* If the file has an extension and it is not .com and not .exe and
49 * we've been instructed to search the registry, then do so.
50 diff -urN httpd-2.0.47.org/modules/cache/mod_file_cache.c httpd-2.0.47/modules/cache/mod_file_cache.c
51 --- httpd-2.0.47.org/modules/cache/mod_file_cache.c 2003-09-13 14:18:35.000000000 +0200
52 +++ httpd-2.0.47/modules/cache/mod_file_cache.c 2003-09-13 22:55:50.000000000 +0200
55 apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
57 - apr_mmap_dup(&mm, file->mm, r->pool, 0);
58 + apr_mmap_dup(&mm, file->mm, r->pool);
59 b = apr_bucket_mmap_create(mm, 0, (apr_size_t)file->finfo.size,
61 APR_BRIGADE_INSERT_TAIL(bb, b);
62 diff -urN httpd-2.0.47.org/modules/dav/fs/lock.c httpd-2.0.47/modules/dav/fs/lock.c
63 --- httpd-2.0.47.org/modules/dav/fs/lock.c 2003-09-13 14:18:35.000000000 +0200
64 +++ httpd-2.0.47/modules/dav/fs/lock.c 2003-09-13 22:52:08.000000000 +0200
68 /* if we don't see the file, then it's a locknull */
69 - rv = apr_lstat(&finfo, fname, APR_FINFO_MIN, p);
70 + rv = apr_stat(&finfo, fname, APR_FINFO_MIN, p);
71 if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
72 if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
73 /* ### push a higher-level description? */
74 diff -urN httpd-2.0.47.org/modules/dav/fs/repos.c httpd-2.0.47/modules/dav/fs/repos.c
75 --- httpd-2.0.47.org/modules/dav/fs/repos.c 2003-09-13 14:18:35.000000000 +0200
76 +++ httpd-2.0.47/modules/dav/fs/repos.c 2003-09-13 22:52:08.000000000 +0200
80 /* ### Optimize me, dirent can give us what we need! */
81 - status = apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf,
82 + status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf,
83 APR_FINFO_NORM, pool);
84 if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
85 /* woah! where'd it go? */
86 diff -urN httpd-2.0.47.org/modules/experimental/mod_mem_cache.c httpd-2.0.47/modules/experimental/mod_mem_cache.c
87 --- httpd-2.0.47.org/modules/experimental/mod_mem_cache.c 2003-09-13 14:18:35.000000000 +0200
88 +++ httpd-2.0.47/modules/experimental/mod_mem_cache.c 2003-09-13 22:50:47.000000000 +0200
90 if (rv != APR_SUCCESS) {
93 - apr_file_unset_inherit(tmpfile);
94 + apr_file_inherit_unset(tmpfile);
95 apr_os_file_get(&(mobj->fd), tmpfile);
97 /* Open for business */
98 diff -urN httpd-2.0.47.org/modules/filters/mod_include.c httpd-2.0.47/modules/filters/mod_include.c
99 --- httpd-2.0.47.org/modules/filters/mod_include.c 2003-09-13 14:18:35.000000000 +0200
100 +++ httpd-2.0.47/modules/filters/mod_include.c 2003-09-13 22:41:52.000000000 +0200
102 val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0);
104 else if (!strcasecmp(var, "USER_NAME")) {
105 - if (apr_get_username(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
106 + if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
110 diff -urN httpd-2.0.47.org/modules/generators/mod_autoindex.c httpd-2.0.47/modules/generators/mod_autoindex.c
111 --- httpd-2.0.47.org/modules/generators/mod_autoindex.c 2003-09-13 14:18:35.000000000 +0200
112 +++ httpd-2.0.47/modules/generators/mod_autoindex.c 2003-09-13 22:23:20.000000000 +0200
116 #ifdef CASE_BLIND_FILESYSTEM
117 -#define MATCH_FLAGS FNM_CASE_BLIND
118 +#define MATCH_FLAGS APR_FNM_CASE_BLIND
120 #define MATCH_FLAGS 0
122 @@ -1298,7 +1298,7 @@
124 #ifndef CASE_BLIND_FILESYSTEM
125 if (pattern && (apr_fnmatch(pattern, dirent->name,
126 - FNM_NOESCAPE | FNM_PERIOD)
127 + APR_FNM_NOESCAPE | APR_FNM_PERIOD)
130 #else /* !CASE_BLIND_FILESYSTEM */
131 @@ -1308,7 +1308,7 @@
132 * reliably - so we have to granularise at the OS level.
134 if (pattern && (apr_fnmatch(pattern, dirent->name,
135 - FNM_NOESCAPE | FNM_PERIOD | FNM_CASE_BLIND)
136 + APR_FNM_NOESCAPE | APR_FNM_PERIOD | APR_FNM_CASE_BLIND)
139 #endif /* !CASE_BLIND_FILESYSTEM */
140 diff -urN httpd-2.0.47.org/modules/generators/mod_cgi.c httpd-2.0.47/modules/generators/mod_cgi.c
141 --- httpd-2.0.47.org/modules/generators/mod_cgi.c 2003-09-13 14:18:35.000000000 +0200
142 +++ httpd-2.0.47/modules/generators/mod_cgi.c 2003-09-13 22:41:52.000000000 +0200
144 /* Bad things happened. Everyone should have cleaned up. */
145 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
146 "couldn't create child process: %d: %s", rc,
147 - apr_filename_of_pathname(r->filename));
148 + apr_filepath_name_get(r->filename));
151 apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
156 - argv0 = apr_filename_of_pathname(r->filename);
157 + argv0 = apr_filepath_name_get(r->filename);
158 nph = !(strncmp(argv0, "nph-", 4));
159 conf = ap_get_module_config(r->server->module_config, &cgi_module);
161 diff -urN httpd-2.0.47.org/modules/generators/mod_cgid.c httpd-2.0.47/modules/generators/mod_cgid.c
162 --- httpd-2.0.47.org/modules/generators/mod_cgid.c 2003-09-13 14:18:35.000000000 +0200
163 +++ httpd-2.0.47/modules/generators/mod_cgid.c 2003-09-13 22:41:52.000000000 +0200
166 ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
167 "couldn't create child process: %d: %s", rc,
168 - apr_filename_of_pathname(r->filename));
169 + apr_filepath_name_get(r->filename));
172 apr_hash_set(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id),
173 diff -urN httpd-2.0.47.org/modules/mappers/mod_negotiation.c httpd-2.0.47/modules/mappers/mod_negotiation.c
174 --- httpd-2.0.47.org/modules/mappers/mod_negotiation.c 2003-09-13 14:18:35.000000000 +0200
175 +++ httpd-2.0.47/modules/mappers/mod_negotiation.c 2003-09-13 22:41:53.000000000 +0200
176 @@ -1002,7 +1002,7 @@
179 mime_info.bytes = len;
180 - mime_info.file_name = apr_filename_of_pathname(rr->filename);
181 + mime_info.file_name = apr_filepath_name_get(rr->filename);
185 diff -urN httpd-2.0.47.org/modules/mappers/mod_rewrite.c httpd-2.0.47/modules/mappers/mod_rewrite.c
186 --- httpd-2.0.47.org/modules/mappers/mod_rewrite.c 2003-09-13 14:18:35.000000000 +0200
187 +++ httpd-2.0.47/modules/mappers/mod_rewrite.c 2003-09-13 22:52:08.000000000 +0200
188 @@ -2285,7 +2285,7 @@
190 else if (strcmp(p->pattern, "-l") == 0) {
192 - if (apr_lstat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) {
193 + if (apr_stat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS) {
194 if (sb.filetype == APR_LNK) {
197 @@ -2912,7 +2912,7 @@
200 /* lookup username in systems passwd file */
201 - if (apr_get_home_directory(&homedir, user, r->pool) == APR_SUCCESS) {
202 + if (apr_uid_homepath_get(&homedir, user, r->pool) == APR_SUCCESS) {
203 /* ok, user was found, so expand the ~user string */
204 if (uri[i] != '\0') {
205 /* ~user/anything... has to be expanded */
206 @@ -3913,13 +3913,13 @@
207 else if (strcasecmp(var, "SCRIPT_USER") == 0) {
208 result = "<unknown>";
209 if (r->finfo.valid & APR_FINFO_USER) {
210 - apr_get_username((char **)&result, r->finfo.user, r->pool);
211 + apr_uid_name_get((char **)&result, r->finfo.user, r->pool);
214 else if (strcasecmp(var, "SCRIPT_GROUP") == 0) {
215 result = "<unknown>";
216 if (r->finfo.valid & APR_FINFO_GROUP) {
217 - apr_group_name_get((char **)&result, r->finfo.group, r->pool);
218 + apr_gid_name_get((char **)&result, r->finfo.group, r->pool);
222 diff -urN httpd-2.0.47.org/modules/mappers/mod_userdir.c httpd-2.0.47/modules/mappers/mod_userdir.c
223 --- httpd-2.0.47.org/modules/mappers/mod_userdir.c 2003-09-13 14:18:35.000000000 +0200
224 +++ httpd-2.0.47/modules/mappers/mod_userdir.c 2003-09-13 22:41:53.000000000 +0200
229 - if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
230 + if (apr_uid_homepath_get(&homedir, w, r->pool) == APR_SUCCESS) {
231 filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
238 - if (apr_get_userid(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
239 + if (apr_uid_get(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
243 diff -urN httpd-2.0.47.org/modules/proxy/proxy_connect.c httpd-2.0.47/modules/proxy/proxy_connect.c
244 --- httpd-2.0.47.org/modules/proxy/proxy_connect.c 2003-09-13 14:18:35.000000000 +0200
245 +++ httpd-2.0.47/modules/proxy/proxy_connect.c 2003-09-13 22:41:53.000000000 +0200
246 @@ -267,10 +267,10 @@
247 "proxy: CONNECT: sending the CONNECT request to the remote proxy");
248 nbytes = apr_snprintf(buffer, sizeof(buffer),
249 "CONNECT %s HTTP/1.0" CRLF, r->uri);
250 - apr_send(sock, buffer, &nbytes);
251 + apr_socket_send(sock, buffer, &nbytes);
252 nbytes = apr_snprintf(buffer, sizeof(buffer),
253 "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
254 - apr_send(sock, buffer, &nbytes);
255 + apr_socket_send(sock, buffer, &nbytes);
258 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
259 @@ -278,11 +278,11 @@
260 nbytes = apr_snprintf(buffer, sizeof(buffer),
261 "HTTP/1.0 200 Connection Established" CRLF);
262 ap_xlate_proto_to_ascii(buffer, nbytes);
263 - apr_send(client_socket, buffer, &nbytes);
264 + apr_socket_send(client_socket, buffer, &nbytes);
265 nbytes = apr_snprintf(buffer, sizeof(buffer),
266 "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
267 ap_xlate_proto_to_ascii(buffer, nbytes);
268 - apr_send(client_socket, buffer, &nbytes);
269 + apr_socket_send(client_socket, buffer, &nbytes);
271 /* This is safer code, but it doesn't work yet. I'm leaving it
272 * here so that I can fix it later.
274 /* ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
275 "proxy: CONNECT: sock was set");*/
276 nbytes = sizeof(buffer);
277 - if (apr_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
278 + if (apr_socket_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
283 * if ((nbytes = ap_rwrite(buffer + o, nbytes, r)) < 0)
286 - if (apr_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
287 + if (apr_socket_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
291 @@ -366,13 +366,13 @@
292 /* ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
293 "proxy: CONNECT: client was set");*/
294 nbytes = sizeof(buffer);
295 - if (apr_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
296 + if (apr_socket_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
302 - if (apr_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
303 + if (apr_socket_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
307 diff -urN httpd-2.0.47.org/modules/proxy/proxy_ftp.c httpd-2.0.47/modules/proxy/proxy_ftp.c
308 --- httpd-2.0.47.org/modules/proxy/proxy_ftp.c 2003-09-13 14:18:35.000000000 +0200
309 +++ httpd-2.0.47/modules/proxy/proxy_ftp.c 2003-09-13 22:41:53.000000000 +0200
312 while (connect_addr) {
314 - if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
315 + if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
316 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
317 "proxy: FTP: error creating socket");
318 connect_addr = connect_addr->next;
320 connect_addr->family, connect_addr, connectname);
322 /* make the connection out of the socket */
323 - rv = apr_connect(sock, connect_addr);
324 + rv = apr_socket_connect(sock, connect_addr);
326 /* if an error occurred, loop round and try again */
327 if (rv != APR_SUCCESS) {
328 @@ -1272,7 +1272,7 @@
329 "proxy: FTP: EPSV contacting remote host on port %d",
332 - if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
333 + if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
334 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
335 "proxy: FTP: error creating EPSV socket");
336 return HTTP_INTERNAL_SERVER_ERROR;
337 @@ -1291,7 +1291,7 @@
338 apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
339 apr_sockaddr_ip_get(&data_ip, data_addr);
340 apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port, 0, p);
341 - rv = apr_connect(data_sock, epsv_addr);
342 + rv = apr_socket_connect(data_sock, epsv_addr);
343 if (rv != APR_SUCCESS) {
344 ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
345 "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?", epsv_addr);
346 @@ -1359,7 +1359,7 @@
347 "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d",
348 h3, h2, h1, h0, pasvport);
350 - if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
351 + if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
352 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
353 "proxy: error creating PASV socket");
354 return HTTP_INTERNAL_SERVER_ERROR;
355 @@ -1376,7 +1376,7 @@
357 /* make the connection */
358 apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p);
359 - rv = apr_connect(data_sock, pasv_addr);
360 + rv = apr_socket_connect(data_sock, pasv_addr);
361 if (rv != APR_SUCCESS) {
362 ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
363 "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
364 @@ -1402,7 +1402,7 @@
365 apr_port_t local_port;
366 unsigned int h0, h1, h2, h3, p0, p1;
368 - if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
369 + if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
370 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
371 "proxy: FTP: error creating local socket");
372 return HTTP_INTERNAL_SERVER_ERROR;
373 @@ -1422,14 +1422,14 @@
375 apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
377 - if ((rv = apr_bind(local_sock, local_addr)) != APR_SUCCESS) {
378 + if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
379 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
380 "proxy: FTP: error binding to ftp data socket %pI", local_addr);
381 return HTTP_INTERNAL_SERVER_ERROR;
384 /* only need a short queue */
385 - if ((rv = apr_listen(local_sock, 2)) != APR_SUCCESS) {
386 + if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
387 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
388 "proxy: FTP: error listening to ftp data socket %pI", local_addr);
389 return HTTP_INTERNAL_SERVER_ERROR;
390 @@ -1766,7 +1766,7 @@
391 /* wait for connection */
394 - rv = apr_accept(&data_sock, local_sock, r->pool);
395 + rv = apr_socket_accept(&data_sock, local_sock, r->pool);
396 if (rv == APR_EINTR) {
399 diff -urN httpd-2.0.47.org/modules/proxy/proxy_http.c httpd-2.0.47/modules/proxy/proxy_http.c
400 --- httpd-2.0.47.org/modules/proxy/proxy_http.c 2003-09-13 14:18:35.000000000 +0200
401 +++ httpd-2.0.47/modules/proxy/proxy_http.c 2003-09-13 22:41:53.000000000 +0200
403 apr_socket_timeout_get(p_conn->sock, ¤t_timeout);
405 apr_socket_timeout_set(p_conn->sock, 0);
406 - socket_status = apr_recv(p_conn->sock, test_buffer, &buffer_len);
407 + socket_status = apr_socket_recv(p_conn->sock, test_buffer, &buffer_len);
408 /* put back old timeout */
409 apr_socket_timeout_set(p_conn->sock, current_timeout);
410 if ( APR_STATUS_IS_EOF(socket_status) ) {
411 diff -urN httpd-2.0.47.org/modules/proxy/proxy_util.c httpd-2.0.47/modules/proxy/proxy_util.c
412 --- httpd-2.0.47.org/modules/proxy/proxy_util.c 2003-09-13 14:18:35.000000000 +0200
413 +++ httpd-2.0.47/modules/proxy/proxy_util.c 2003-09-13 22:41:53.000000000 +0200
414 @@ -1167,7 +1167,7 @@
416 while (backend_addr && !connected) {
417 if ((rv = apr_socket_create(newsock, backend_addr->family,
418 - SOCK_STREAM, p)) != APR_SUCCESS) {
419 + SOCK_STREAM, 0, p)) != APR_SUCCESS) {
420 loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
421 ap_log_error(APLOG_MARK, loglevel, rv, s,
422 "proxy: %s: error creating fam %d socket for target %s",
423 @@ -1205,7 +1205,7 @@
424 proxy_function, backend_addr->family, backend_name);
426 /* make the connection out of the socket */
427 - rv = apr_connect(*newsock, backend_addr);
428 + rv = apr_socket_connect(*newsock, backend_addr);
430 /* if an error occurred, loop round and try again */
431 if (rv != APR_SUCCESS) {
432 diff -urN httpd-2.0.47.org/modules/ssl/ssl_engine_init.c httpd-2.0.47/modules/ssl/ssl_engine_init.c
433 --- httpd-2.0.47.org/modules/ssl/ssl_engine_init.c 2003-09-13 14:18:35.000000000 +0200
434 +++ httpd-2.0.47/modules/ssl/ssl_engine_init.c 2003-09-13 22:23:10.000000000 +0200
435 @@ -855,11 +855,11 @@
438 if (SSL_X509_getCN(ptemp, cert, &cn)) {
439 - int fnm_flags = FNM_PERIOD|FNM_CASE_BLIND;
440 + int fnm_flags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND;
442 if (apr_fnmatch_test(cn) &&
443 (apr_fnmatch(cn, s->server_hostname,
444 - fnm_flags) == FNM_NOMATCH))
445 + fnm_flags) == APR_FNM_NOMATCH))
447 ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
448 "%s server certificate wildcard CommonName (CN) `%s' "
449 diff -urN httpd-2.0.47.org/modules/ssl/ssl_scache_dbm.c httpd-2.0.47/modules/ssl/ssl_scache_dbm.c
450 --- httpd-2.0.47.org/modules/ssl/ssl_scache_dbm.c 2003-09-13 14:18:35.000000000 +0200
451 +++ httpd-2.0.47/modules/ssl/ssl_scache_dbm.c 2003-09-15 20:34:39.000000000 +0200
453 SSLModConfigRec *mc = myModConfig(s);
456 - apr_pool_sub_make(&p, mc->pPool, NULL);
457 + apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
459 /* the correct way */
460 unlink(apr_pstrcat(p, mc->szSessionCacheDataFile, SSL_DBM_FILE_SUFFIX_DIR, NULL));
464 /* allocate the key array in a memory sub pool */
465 - apr_pool_sub_make(&p, mc->pPool, NULL);
466 + apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
469 if ((keylist = apr_palloc(p, sizeof(dbmkey)*KEYMAX)) == NULL) {
470 diff -urN httpd-2.0.47.org/os/beos/beosd.c httpd-2.0.47/os/beos/beosd.c
471 --- httpd-2.0.47.org/os/beos/beosd.c 2003-09-13 14:18:32.000000000 +0200
472 +++ httpd-2.0.47/os/beos/beosd.c 2003-09-13 22:41:54.000000000 +0200
477 - status = apr_accept(&csd, lr->sd, ptrans);
478 + status = apr_socket_accept(&csd, lr->sd, ptrans);
479 if (status == APR_SUCCESS) {
481 apr_os_sock_get(&sockdes, csd);
482 @@ -195,13 +195,13 @@
483 * occur in mobile IP.
485 ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
486 - "apr_accept: giving up.");
487 + "apr_socket_accept: giving up.");
492 ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
493 - "apr_accept: (client socket)");
494 + "apr_socket_accept: (client socket)");
498 diff -urN httpd-2.0.47.org/os/unix/unixd.c httpd-2.0.47/os/unix/unixd.c
499 --- httpd-2.0.47.org/os/unix/unixd.c 2003-09-13 14:18:32.000000000 +0200
500 +++ httpd-2.0.47/os/unix/unixd.c 2003-09-13 22:41:54.000000000 +0200
505 - status = apr_accept(&csd, lr->sd, ptrans);
506 + status = apr_socket_accept(&csd, lr->sd, ptrans);
507 if (status == APR_SUCCESS) {
509 apr_os_sock_get(&sockdes, csd);
511 * occur in mobile IP.
513 ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
514 - "apr_accept: giving up.");
515 + "apr_socket_accept: giving up.");
522 ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
523 - "apr_accept: (client socket)");
524 + "apr_socket_accept: (client socket)");
528 diff -urN httpd-2.0.47.org/server/config.c httpd-2.0.47/server/config.c
529 --- httpd-2.0.47.org/server/config.c 2003-09-13 14:18:35.000000000 +0200
530 +++ httpd-2.0.47/server/config.c 2003-09-13 22:52:08.000000000 +0200
531 @@ -1460,7 +1460,7 @@
532 if ((ap_server_pre_read_config->nelts
533 || ap_server_post_read_config->nelts)
534 && !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
535 - if (apr_lstat(&finfo, fname, APR_FINFO_TYPE, p) != APR_SUCCESS)
536 + if (apr_stat(&finfo, fname, APR_FINFO_TYPE, p) != APR_SUCCESS)
540 @@ -1521,7 +1521,7 @@
541 && strcmp(dirent.name, "..")
543 apr_fnmatch(pattern, dirent.name,
544 - FNM_PERIOD) == APR_SUCCESS)) {
545 + APR_FNM_PERIOD) == APR_SUCCESS)) {
546 fnew = (fnames *) apr_array_push(candidates);
547 fnew->fname = ap_make_full_path(p, path, dirent.name);
549 diff -urN httpd-2.0.47.org/server/connection.c httpd-2.0.47/server/connection.c
550 --- httpd-2.0.47.org/server/connection.c 2003-09-13 14:18:35.000000000 +0200
551 +++ httpd-2.0.47/server/connection.c 2003-09-13 22:41:51.000000000 +0200
553 /* Shut down the socket for write, which will send a FIN
556 - if (apr_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
557 + if (apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
559 apr_socket_close(csd);
562 apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
564 nbytes = sizeof(dummybuf);
565 - rc = apr_recv(csd, dummybuf, &nbytes);
566 + rc = apr_socket_recv(csd, dummybuf, &nbytes);
567 if (rc != APR_SUCCESS || nbytes == 0)
570 diff -urN httpd-2.0.47.org/server/core.c httpd-2.0.47/server/core.c
571 --- httpd-2.0.47.org/server/core.c 2003-09-13 14:18:35.000000000 +0200
572 +++ httpd-2.0.47/server/core.c 2003-09-13 22:41:51.000000000 +0200
573 @@ -2862,7 +2862,7 @@
575 /* XXX handle checking for non-blocking socket */
576 while (bytes_written != len) {
577 - rv = apr_sendv(s, vec + i, nvec - i, &n);
578 + rv = apr_socket_sendv(s, vec + i, nvec - i, &n);
580 if (rv != APR_SUCCESS)
582 @@ -2870,7 +2870,7 @@
585 /* If the write did not complete, adjust the iovecs and issue
587 + * apr_socket_sendv again
589 if (bytes_written < len) {
590 /* Skip over the vectors that have already been written */
591 @@ -2925,7 +2925,7 @@
593 apr_size_t tmplen = file_bytes_left;
595 - rv = apr_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
596 + rv = apr_socket_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
598 *bytes_sent += tmplen;
599 total_bytes_left -= tmplen;
600 @@ -3036,7 +3036,7 @@
601 rv = apr_file_read(fd, buffer, &sendlen);
602 while (rv == APR_SUCCESS && sendlen) {
603 bytes_sent = sendlen;
604 - rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
605 + rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
606 if (rv == APR_SUCCESS) {
607 sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
608 o += bytes_sent; /* o is where we are in the buffer */
609 @@ -4147,7 +4147,7 @@
611 &bytes_sent, /* how many bytes were
613 - flags); /* apr_sendfile flags */
614 + flags); /* apr_socket_sendfile flags */
616 if (logio_add_bytes_out && bytes_sent > 0)
617 logio_add_bytes_out(c, bytes_sent);
618 diff -urN httpd-2.0.47.org/server/listen.c httpd-2.0.47/server/listen.c
619 --- httpd-2.0.47.org/server/listen.c 2003-09-13 14:18:35.000000000 +0200
620 +++ httpd-2.0.47/server/listen.c 2003-09-13 22:41:51.000000000 +0200
622 ap_sock_disable_nagle(s);
625 - if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
626 + if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
627 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
628 "make_sock: could not bind to address %pI",
634 - if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
635 + if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
636 ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
637 "make_sock: unable to listen for connections "
639 @@ -250,10 +250,10 @@
640 apr_socket_t *tmp_sock;
643 - if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, p))
644 + if ((sock_rv = apr_socket_create(&tmp_sock, APR_INET6, SOCK_STREAM, 0, p))
646 apr_sockaddr_info_get(&sa, NULL, APR_INET6, 0, 0, p) == APR_SUCCESS &&
647 - apr_bind(tmp_sock, sa) == APR_SUCCESS) {
648 + apr_socket_bind(tmp_sock, sa) == APR_SUCCESS) {
649 default_family = APR_INET6;
654 if ((status = apr_socket_create(&new->sd,
655 new->bind_addr->family,
656 - SOCK_STREAM, process->pool))
657 + SOCK_STREAM, 0, process->pool))
659 ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
660 "alloc_listener: failed to get a socket for %s", addr);
661 diff -urN httpd-2.0.47.org/server/main.c httpd-2.0.47/server/main.c
662 --- httpd-2.0.47.org/server/main.c 2003-09-13 14:18:35.000000000 +0200
663 +++ httpd-2.0.47/server/main.c 2003-09-13 22:41:51.000000000 +0200
665 apr_pool_tag(process->pconf, "pconf");
666 process->argc = argc;
667 process->argv = argv;
668 - process->short_name = apr_filename_of_pathname(argv[0]);
669 + process->short_name = apr_filepath_name_get(argv[0]);
673 diff -urN httpd-2.0.47.org/server/mpm/beos/beos.c httpd-2.0.47/server/mpm/beos/beos.c
674 --- httpd-2.0.47.org/server/mpm/beos/beos.c 2003-09-13 14:18:35.000000000 +0200
675 +++ httpd-2.0.47/server/mpm/beos/beos.c 2003-09-13 22:41:52.000000000 +0200
678 for (i = 0 ; i < ap_max_child_assigned; i++){
680 - if (apr_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
681 + if (apr_socket_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
686 char *tmpbuf = apr_palloc(ptrans, sizeof(char) * 5);
687 apr_sockaddr_info_get(&rec_sa, "127.0.0.1", APR_UNSPEC, 7772, 0, ptrans);
689 - if ((ret = apr_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf, &len))
690 + if ((ret = apr_socket_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf, &len))
692 ap_log_error(APLOG_MARK, APLOG_ERR, ret, NULL,
693 "error getting data from UDP!!");
694 @@ -483,12 +483,12 @@
697 if (!this_worker_should_exit) {
698 - rv = apr_accept(&csd, sd, ptrans);
699 + rv = apr_socket_accept(&csd, sd, ptrans);
701 apr_thread_mutex_unlock(accept_mutex);
702 if (rv != APR_SUCCESS) {
703 ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
705 + "apr_socket_accept");
707 process_socket(ptrans, csd, child_slot, bucket_alloc);
708 requests_this_child--;
709 @@ -795,13 +795,13 @@
710 "couldn't create control socket information, shutting down");
713 - if (apr_socket_create(&udp_sock, udp_sa->family, SOCK_DGRAM,
714 + if (apr_socket_create(&udp_sock, udp_sa->family, SOCK_DGRAM, 0
715 _pconf) != APR_SUCCESS){
716 ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s,
717 "couldn't create control socket, shutting down");
720 - if (apr_bind(udp_sock, udp_sa) != APR_SUCCESS){
721 + if (apr_socket_bind(udp_sock, udp_sa) != APR_SUCCESS){
722 ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s,
723 "couldn't bind UDP socket!");
725 diff -urN httpd-2.0.47.org/server/mpm/experimental/perchild/perchild.c httpd-2.0.47/server/mpm/experimental/perchild/perchild.c
726 --- httpd-2.0.47.org/server/mpm/experimental/perchild/perchild.c 2003-09-13 14:18:35.000000000 +0200
727 +++ httpd-2.0.47/server/mpm/experimental/perchild/perchild.c 2003-09-13 22:41:52.000000000 +0200
732 - ret = apr_recv(lr->sd, &pipe_read_char, &n);
733 + ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
734 if (APR_STATUS_IS_EAGAIN(ret)) {
735 /* It lost the lottery. It must continue to suffer
736 * through a life of servitude. */
737 diff -urN httpd-2.0.47.org/server/mpm/mpmt_os2/mpmt_os2.c httpd-2.0.47/server/mpm/mpmt_os2/mpmt_os2.c
738 --- httpd-2.0.47.org/server/mpm/mpmt_os2/mpmt_os2.c 2003-09-13 14:18:35.000000000 +0200
739 +++ httpd-2.0.47/server/mpm/mpmt_os2/mpmt_os2.c 2003-09-13 22:31:15.000000000 +0200
741 apr_sockaddr_info_get(&lr->bind_addr, "0.0.0.0", APR_UNSPEC,
742 DEFAULT_HTTP_PORT, 0, s->process->pool);
743 apr_socket_create(&lr->sd, lr->bind_addr->family,
744 - SOCK_STREAM, s->process->pool);
745 + SOCK_STREAM, 0, s->process->pool);
748 for (lr = ap_listeners; lr; lr = lr->next) {
749 diff -urN httpd-2.0.47.org/server/mpm/mpmt_os2/mpmt_os2_child.c httpd-2.0.47/server/mpm/mpmt_os2/mpmt_os2_child.c
750 --- httpd-2.0.47.org/server/mpm/mpmt_os2/mpmt_os2_child.c 2003-09-13 14:18:35.000000000 +0200
751 +++ httpd-2.0.47/server/mpm/mpmt_os2/mpmt_os2_child.c 2003-09-13 22:41:52.000000000 +0200
753 worker_args->pconn = pconn;
755 if (num_listeners == 1) {
756 - rv = apr_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
757 + rv = apr_socket_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
759 rc = DosRequestMutexSem(ap_mpm_accept_mutex, SEM_INDEFINITE_WAIT);
761 @@ -287,14 +287,14 @@
765 - rv = apr_accept(&worker_args->conn_sd, sd, pconn);
766 + rv = apr_socket_accept(&worker_args->conn_sd, sd, pconn);
770 if (rv != APR_SUCCESS) {
771 if (!APR_STATUS_IS_EINTR(rv)) {
772 ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
774 + "apr_socket_accept");
775 clean_child_exit(APEXIT_CHILDFATAL);
778 diff -urN httpd-2.0.47.org/server/mpm/netware/mpm_netware.c httpd-2.0.47/server/mpm/netware/mpm_netware.c
779 --- httpd-2.0.47.org/server/mpm/netware/mpm_netware.c 2003-09-13 14:18:35.000000000 +0200
780 +++ httpd-2.0.47/server/mpm/netware/mpm_netware.c 2003-09-13 22:41:52.000000000 +0200
782 wouldblock_retry = MAX_WB_RETRIES;
784 while (wouldblock_retry) {
785 - if ((stat = apr_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
786 + if ((stat = apr_socket_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
790 @@ -526,13 +526,13 @@
791 * occur in mobile IP.
793 ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
794 - "apr_accept: giving up.");
795 + "apr_socket_accept: giving up.");
796 clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, pthrd,
800 ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
801 - "apr_accept: (client socket)");
802 + "apr_socket_accept: (client socket)");
803 clean_child_exit(1, my_worker_num, pthrd, bucket_alloc);
806 diff -urN httpd-2.0.47.org/server/mpm/winnt/mpm_winnt.c httpd-2.0.47/server/mpm/winnt/mpm_winnt.c
807 --- httpd-2.0.47.org/server/mpm/winnt/mpm_winnt.c 2003-09-13 14:18:35.000000000 +0200
808 +++ httpd-2.0.47/server/mpm/winnt/mpm_winnt.c 2003-09-15 20:35:15.000000000 +0200
813 - apr_pool_sub_make(&ptemp, p, NULL);
814 + apr_pool_create_ex(&ptemp, p, NULL, NULL);
816 /* Build the command line. Should look something like this:
817 * C:/apache/bin/apache.exe -f ap_server_confname
818 @@ -1168,10 +1168,10 @@
819 /* WARNING: There is an implict assumption here that the
820 * executable resides in ServerRoot or ServerRoot\bin
822 - def_server_root = (char *) apr_filename_of_pathname(binpath);
823 + def_server_root = (char *) apr_filepath_name_get(binpath);
824 if (def_server_root > binpath) {
825 *(def_server_root - 1) = '\0';
826 - def_server_root = (char *) apr_filename_of_pathname(binpath);
827 + def_server_root = (char *) apr_filepath_name_get(binpath);
828 if (!strcasecmp(def_server_root, "bin"))
829 *(def_server_root - 1) = '\0';
831 diff -urN httpd-2.0.47.org/server/mpm/winnt/nt_eventlog.c httpd-2.0.47/server/mpm/winnt/nt_eventlog.c
832 --- httpd-2.0.47.org/server/mpm/winnt/nt_eventlog.c 2003-09-13 14:18:35.000000000 +0200
833 +++ httpd-2.0.47/server/mpm/winnt/nt_eventlog.c 2003-09-15 20:35:04.000000000 +0200
838 - apr_pool_sub_make(&p, NULL, NULL);
839 + apr_pool_create_ex(&p, NULL, NULL, NULL);
841 errarg[0] = "The Apache service named";
842 errarg[1] = display_name;
843 diff -urN httpd-2.0.47.org/server/mpm/worker/pod.c httpd-2.0.47/server/mpm/worker/pod.c
844 --- httpd-2.0.47.org/server/mpm/worker/pod.c 2003-09-13 14:18:35.000000000 +0200
845 +++ httpd-2.0.47/server/mpm/worker/pod.c 2003-09-13 22:50:47.000000000 +0200
849 /* close these before exec. */
850 - apr_file_unset_inherit((*pod)->pod_in);
851 - apr_file_unset_inherit((*pod)->pod_out);
852 + apr_file_inherit_unset((*pod)->pod_in);
853 + apr_file_inherit_unset((*pod)->pod_out);
857 diff -urN httpd-2.0.47.org/server/mpm_common.c httpd-2.0.47/server/mpm_common.c
858 --- httpd-2.0.47.org/server/mpm_common.c 2003-09-13 14:18:35.000000000 +0200
859 +++ httpd-2.0.47/server/mpm_common.c 2003-09-13 22:50:47.000000000 +0200
861 APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
863 /* close these before exec. */
864 - apr_file_unset_inherit((*pod)->pod_in);
865 - apr_file_unset_inherit((*pod)->pod_out);
866 + apr_file_inherit_unset((*pod)->pod_in);
867 + apr_file_inherit_unset((*pod)->pod_out);
875 - rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, p);
876 + rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, 0, p);
877 if (rv != APR_SUCCESS) {
878 ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
879 "get socket to connect to listener");
884 - rv = apr_connect(sock, pod->sa);
885 + rv = apr_socket_connect(sock, pod->sa);
886 if (rv != APR_SUCCESS) {
887 int log_level = APLOG_WARNING;
889 diff -urN httpd-2.0.47.org/server/request.c httpd-2.0.47/server/request.c
890 --- httpd-2.0.47.org/server/request.c 2003-09-13 14:18:35.000000000 +0200
891 +++ httpd-2.0.47/server/request.c 2003-09-13 22:52:08.000000000 +0200
893 * owner of the symlink, then get the info of the target.
895 if (!(lfi->valid & APR_FINFO_OWNER)) {
896 - if ((res = apr_lstat(&fi, d, lfi->valid | APR_FINFO_OWNER, p))
897 + if ((res = apr_stat(&fi, d, lfi->valid | APR_FINFO_OWNER, p))
899 return HTTP_FORBIDDEN;
902 return HTTP_FORBIDDEN;
905 - if (apr_compare_users(fi.user, lfi->user) != APR_SUCCESS) {
906 + if (apr_uid_compare(fi.user, lfi->user) != APR_SUCCESS) {
907 return HTTP_FORBIDDEN;
911 && ((entry_core->d_components < seg)
912 || (entry_core->d_is_fnmatch
913 ? (apr_fnmatch(entry_core->d, r->filename,
914 - FNM_PATHNAME) != APR_SUCCESS)
915 + APR_FNM_PATHNAME) != APR_SUCCESS)
916 : (strcmp(r->filename, entry_core->d) != 0)))) {
919 @@ -976,13 +976,13 @@
923 - /* We choose apr_lstat here, rather that apr_stat, so that we
924 + /* We choose apr_stat here, rather that apr_stat, so that we
925 * capture this path object rather than its target. We will
926 * replace the info with our target's info below. We especially
927 * want the name of this 'link' object, not the name of its
928 * target, if we are fixing the filename case/resolving aliases.
930 - rv = apr_lstat(&thisinfo, r->filename,
931 + rv = apr_stat(&thisinfo, r->filename,
932 APR_FINFO_MIN | APR_FINFO_NAME, r->pool);
934 if (APR_STATUS_IS_ENOENT(rv)) {
935 @@ -1273,7 +1273,7 @@
937 ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0)
938 : (entry_core->d_is_fnmatch
939 - ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
940 + ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
941 : (strncmp(entry_core->d, cache->cached, len)
942 || (entry_core->d[len - 1] != '/'
943 && cache->cached[len] != '/'
944 @@ -1422,7 +1422,7 @@
946 ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
947 : (entry_core->d_is_fnmatch
948 - ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
949 + ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
950 : strcmp(entry_core->d, cache->cached))) {
953 @@ -1715,7 +1715,7 @@
954 if ((dirent->valid & APR_FINFO_MIN) != APR_FINFO_MIN) {
956 * apr_dir_read isn't very complete on this platform, so
957 - * we need another apr_lstat (or simply apr_stat if we allow
958 + * we need another apr_stat (or simply apr_stat if we allow
959 * all symlinks here.) If this is an APR_LNK that resolves
960 * to an APR_DIR, then we will rerun everything anyways...
961 * this should be safe.
962 @@ -1729,7 +1729,7 @@
966 - if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
967 + if (((rv = apr_stat(&rnew->finfo, rnew->filename,
968 APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
969 && (rv != APR_INCOMPLETE)) {
970 rnew->finfo.filetype = 0;
971 @@ -1834,7 +1834,7 @@
975 - if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
976 + if (((rv = apr_stat(&rnew->finfo, rnew->filename,
977 APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
978 && (rv != APR_INCOMPLETE)) {
979 rnew->finfo.filetype = 0;
980 diff -urN httpd-2.0.47.org/server/rfc1413.c httpd-2.0.47/server/rfc1413.c
981 --- httpd-2.0.47.org/server/rfc1413.c 2003-09-13 14:18:35.000000000 +0200
982 +++ httpd-2.0.47/server/rfc1413.c 2003-09-13 22:41:51.000000000 +0200
985 if ((rv = apr_socket_create(newsock,
986 localsa->family, /* has to match */
987 - SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
988 + SOCK_STREAM, 0, conn->pool)) != APR_SUCCESS) {
989 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
990 "rfc1413: error creating query socket");
993 * addresses from the query socket.
996 - if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
997 + if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
998 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
999 "rfc1413: Error binding query socket to local port");
1000 apr_socket_close(*newsock);
1002 * errors from connect usually imply the remote machine doesn't support
1003 * the service; don't log such an error
1005 - if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
1006 + if ((rv = apr_socket_connect(*newsock, destsa)) != APR_SUCCESS) {
1007 apr_socket_close(*newsock);
1011 while (i < buflen) {
1012 apr_size_t j = strlen(buffer + i);
1013 apr_status_t status;
1014 - status = apr_send(sock, buffer+i, &j);
1015 + status = apr_socket_send(sock, buffer+i, &j);
1016 if (status != APR_SUCCESS) {
1017 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1018 "write: rfc1413: error sending request");
1020 while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
1021 apr_size_t j = sizeof(buffer) - 1 - i;
1022 apr_status_t status;
1023 - status = apr_recv(sock, buffer+i, &j);
1024 + status = apr_socket_recv(sock, buffer+i, &j);
1025 if (status != APR_SUCCESS) {
1026 ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
1027 "read: rfc1413: error reading response");
1028 diff -urN httpd-2.0.47.org/server/util.c httpd-2.0.47/server/util.c
1029 --- httpd-2.0.47.org/server/util.c 2003-09-13 14:18:35.000000000 +0200
1030 +++ httpd-2.0.47/server/util.c 2003-09-13 22:52:08.000000000 +0200
1033 if (finfo.filetype != APR_REG &&
1034 #if defined(WIN32) || defined(OS2) || defined(NETWARE)
1035 - strcasecmp(apr_filename_of_pathname(name), "nul") != 0) {
1036 + strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
1038 strcmp(name, "/dev/null") != 0) {
1039 #endif /* WIN32 || OS2 */
1040 @@ -1851,7 +1851,7 @@
1044 - if (apr_lstat(&finfo, path, APR_FINFO_TYPE, p) != APR_SUCCESS)
1045 + if (apr_stat(&finfo, path, APR_FINFO_TYPE, p) != APR_SUCCESS)
1046 return 0; /* in error condition, just return no */
1048 return (finfo.filetype == APR_DIR);
1049 diff -urN httpd-2.0.47.org/server/util_script.c httpd-2.0.47/server/util_script.c
1050 --- httpd-2.0.47.org/server/util_script.c 2003-09-13 14:18:35.000000000 +0200
1051 +++ httpd-2.0.47/server/util_script.c 2003-09-13 22:41:51.000000000 +0200
1053 if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) {
1054 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1055 "Premature end of script headers: %s",
1056 - apr_filename_of_pathname(r->filename));
1057 + apr_filepath_name_get(r->filename));
1058 return HTTP_INTERNAL_SERVER_ERROR;
1063 ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
1064 "%s: %s", malformed,
1065 - apr_filename_of_pathname(r->filename));
1066 + apr_filepath_name_get(r->filename));
1067 return HTTP_INTERNAL_SERVER_ERROR;
1070 diff -urN httpd-2.0.47.org/support/ab.c httpd-2.0.47/support/ab.c
1071 --- httpd-2.0.47.org/support/ab.c 2003-09-13 14:18:35.000000000 +0200
1072 +++ httpd-2.0.47/support/ab.c 2003-09-13 22:41:54.000000000 +0200
1074 ** Version 2.0.36-dev
1075 ** Improvements to concurrent processing:
1076 ** - Enabled non-blocking connect()s.
1077 - ** - Prevent blocking calls to apr_recv() (thereby allowing AB to
1078 + ** - Prevent blocking calls to apr_socket_recv() (thereby allowing AB to
1079 ** manage its entire set of socket descriptors).
1080 - ** - Any error returned from apr_recv() that is not EAGAIN or EOF
1081 + ** - Any error returned from apr_socket_recv() that is not EAGAIN or EOF
1082 ** is now treated as fatal.
1083 ** Contributed by Aaron Bannert, April 24, 2002
1089 - e = apr_send(c->aprsock, request + c->rwrote, &l);
1090 + e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
1093 * Bail early on the most common case
1094 @@ -1242,7 +1242,7 @@
1095 apr_pool_create(&c->ctx, cntxt);
1097 if ((rv = apr_socket_create(&c->aprsock, destsa->family,
1098 - SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
1099 + SOCK_STREAM, 0, c->ctx)) != APR_SUCCESS) {
1100 apr_err("socket", rv);
1102 if ((rv = apr_socket_opt_set(c->aprsock, APR_SO_NONBLOCK, 1))
1103 @@ -1250,7 +1250,7 @@
1104 apr_err("socket nonblock", rv);
1106 c->start = apr_time_now();
1107 - if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1108 + if ((rv = apr_socket_connect(c->aprsock, destsa)) != APR_SUCCESS) {
1109 if (APR_STATUS_IS_EINPROGRESS(rv)) {
1110 apr_pollfd_t new_pollfd;
1111 c->state = STATE_CONNECTING;
1112 @@ -1272,7 +1272,7 @@
1115 "\nTest aborted after 10 failures\n\n");
1116 - apr_err("apr_connect()", rv);
1117 + apr_err("apr_socket_connect()", rv);
1119 c->state = STATE_UNCONNECTED;
1121 @@ -1371,7 +1371,7 @@
1125 - status = apr_recv(c->aprsock, buffer, &r);
1126 + status = apr_socket_recv(c->aprsock, buffer, &r);
1127 if (APR_STATUS_IS_EAGAIN(status))
1129 else if (r == 0 && APR_STATUS_IS_EOF(status)) {
1130 @@ -1379,12 +1379,12 @@
1131 close_connection(c);
1134 - /* catch legitimate fatal apr_recv errors */
1135 + /* catch legitimate fatal apr_socket_recv errors */
1136 else if (status != APR_SUCCESS) {
1137 err_except++; /* XXX: is this the right error counter? */
1138 /* XXX: Should errors here be fatal, or should we allow a
1139 * certain number of them before completely failing? -aaron */
1140 - apr_err("apr_recv", status);
1141 + apr_err("apr_socket_recv", status);