From: Ryan Bloom Date: Wed, 17 Nov 1999 21:39:42 +0000 (+0000) Subject: Cleaned up the APRFile uses in Apache. Also removed the apr.h header file X-Git-Tag: 1.3.10~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2d0f2dd79cb1cd44ce60197dcb4019dd46017ac;p=apache Cleaned up the APRFile uses in Apache. Also removed the apr.h header file because it is no longer used. Finally, I updated the dependancies to compile cleanly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84131 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 573b5391db..b333d3e4ff 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ Apache 2.0 STATUS: -Last modified at [$Date: 1999/11/16 18:30:18 $] +Last modified at [$Date: 1999/11/17 21:39:16 $] Release: @@ -105,8 +105,6 @@ Other bugs that need fixing: behavior. Dean has suggested getting rid of regex containers completely. - * Areas where APRFile is being used need to be cleaned-up - * SIGSEGV on Linux seems to only kill a thread, not a whole process; we need to work around this, probably by bouncing the signal to the sigwait thread. But this will hurt debugability. diff --git a/include/httpd.h b/include/httpd.h index 3debe5bdcb..23b082edf2 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -73,7 +73,6 @@ extern "C" { #include "apr_lib.h" #include "buff.h" #include "ap.h" -#include "apr.h" /* ----------------------------- config dir ------------------------------ */ @@ -1081,6 +1080,8 @@ extern API_VAR_EXPORT time_t ap_restart_time; #endif /* #define HIGH_SLACK_LINE 255 */ +#if 0 +/* Moved to APR now.*/ /* * The ap_slack() function takes a fd, and tries to move it above the indicated * line. It returns an fd which may or may not have moved above the line, and @@ -1094,6 +1095,7 @@ APRFile ap_slack(APRFile fd, int line); #define AP_SLACK_LOW 1 #define AP_SLACK_HIGH 2 #endif +#endif API_EXPORT(char *) ap_escape_quotes(ap_context_t *p, const char *instr); diff --git a/modules/aaa/mod_auth.c b/modules/aaa/mod_auth.c index 37508e9443..107d7d9e82 100644 --- a/modules/aaa/mod_auth.c +++ b/modules/aaa/mod_auth.c @@ -69,6 +69,7 @@ * no control is passed along. */ +#include "apr_md5.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" diff --git a/server/vhost.c b/server/vhost.c index e46d1305c2..7af335235a 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -409,16 +409,14 @@ static ipaddr_chain *find_default_server(unsigned port) return NULL; } - -static void dump_vhost_config(APRFile fd) +static void dump_vhost_config(ap_file_t *f) { int i; ipaddr_chain *ic; name_chain *nc; char buf[MAX_STRING_LEN]; - FILE * f = fdopen(fd, "w"); - fprintf(f, "VirtualHost configuration:\n"); + ap_fprintf(f, "VirtualHost configuration:\n"); for (i = 0; i < IPHASH_TABLE_SIZE; ++i) { for (ic = iphash_table[i]; ic; ic = ic->next) { if (ic->sar->host_port == 0) { @@ -429,23 +427,23 @@ static void dump_vhost_config(APRFile fd) ic->sar->host_port); } if (ic->names == NULL) { - fprintf(f, "%-22s %s (%s:%u)\n", buf, + ap_fprintf(f, "%-22s %s (%s:%u)\n", buf, ic->server->server_hostname, ic->server->defn_name, ic->server->defn_line_number); continue; } - fprintf(f, "%-22s is a NameVirtualHost\n" + ap_fprintf(f, "%-22s is a NameVirtualHost\n" "%22s default server %s (%s:%u)\n", buf, "", ic->server->server_hostname, ic->server->defn_name, ic->server->defn_line_number); for (nc = ic->names; nc; nc = nc->next) { if (nc->sar->host_port) { - fprintf(f, "%22s port %u ", "", nc->sar->host_port); + ap_fprintf(f, "%22s port %u ", "", nc->sar->host_port); } else { - fprintf(f, "%22s port * ", ""); + ap_fprintf(f, "%22s port * ", ""); } - fprintf(f, "namevhost %s (%s:%u)\n", + ap_fprintf(f, "namevhost %s (%s:%u)\n", nc->server->server_hostname, nc->server->defn_name, nc->server->defn_line_number); @@ -453,15 +451,15 @@ static void dump_vhost_config(APRFile fd) } } if (default_list) { - fprintf(f, "_default_ servers:\n"); + ap_fprintf(f, "_default_ servers:\n"); for (ic = default_list; ic; ic = ic->next) { if (ic->sar->host_port == 0) { - fprintf(f, "port * "); + ap_fprintf(f, "port * "); } else { - fprintf(f, "port %u ", ic->sar->host_port); + ap_fprintf(f, "port %u ", ic->sar->host_port); } - fprintf(f, "server %s (%s:%u)\n", + ap_fprintf(f, "server %s (%s:%u)\n", ic->server->server_hostname, ic->server->defn_name, ic->server->defn_line_number); } @@ -649,7 +647,11 @@ void ap_fini_vhost_config(ap_context_t *p, server_rec *main_s) dump_iphash_statistics(main_s); #endif if (getenv("DUMP_VHOSTS")) { - dump_vhost_config(STDERR_FILENO); + int errfileno = STDERR_FILENO; + ap_file_t *thefile = NULL; + + ap_put_os_file(&thefile, &errfileno, p); + dump_vhost_config(thefile); } }