]> granicus.if.org Git - apache/commitdiff
Cleaned up the APRFile uses in Apache. Also removed the apr.h header file
authorRyan Bloom <rbb@apache.org>
Wed, 17 Nov 1999 21:39:42 +0000 (21:39 +0000)
committerRyan Bloom <rbb@apache.org>
Wed, 17 Nov 1999 21:39:42 +0000 (21:39 +0000)
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

STATUS
include/httpd.h
modules/aaa/mod_auth.c
server/vhost.c

diff --git a/STATUS b/STATUS
index 573b5391dba82e4e5cd6dbad585efc0dbbe3c857..b333d3e4ff27f475678ba060257f90f7c1e91805 100644 (file)
--- 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.
index 3debe5bdcb666dc743bc125f5a91b8d7d03ac741..23b082edf276b827083b7dff83354f606d4319d6 100644 (file)
@@ -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);
 
index 37508e94437743a69e0ccad3f80a0be3810e8b7c..107d7d9e82b681b69e612916f09c83d60bf5c663 100644 (file)
@@ -69,6 +69,7 @@
  *         no control is passed along.
  */
 
+#include "apr_md5.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
index e46d1305c2f10a4263d39b534bc0463142e37cef..7af335235a426e5084423b4aa272854217b9adb3 100644 (file)
@@ -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);
     }
 }