]> granicus.if.org Git - apache/commitdiff
This is a huge change to the configure system. Basically, this name space
authorRyan Bloom <rbb@apache.org>
Tue, 18 Jan 2000 23:41:56 +0000 (23:41 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 18 Jan 2000 23:41:56 +0000 (23:41 +0000)
protects most, if not all, of the Apache macros.   This has been tested on
Linux using all of the Unix MPM's.  The biggest push was that Apache's
httpd.h header file can no longer include the ap_config.h file.  Most of the
other files include this themselves now.
Submitted by: Ryan Bloom and Manoj Kasichainula

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84492 13f79535-47bb-0310-9956-ffa450edef68

14 files changed:
modules/aaa/mod_access.c
modules/aaa/mod_auth_digest.c
modules/echo/mod_echo.c
modules/filters/mod_include.c
modules/generators/mod_asis.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgi.c
modules/generators/mod_status.c
modules/http/mod_mime.c
modules/mappers/mod_dir.c
modules/mappers/mod_imap.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_userdir.c
modules/metadata/mod_env.c

index 08639abfd1de1327cb0a5c4d65fddf7a194dddc0..04645985516935faa15d44afe1860613390cf271 100644 (file)
  * 
  */
 
+#include "apr_network_io.h"
 #include "httpd.h"
 #include "http_core.h"
 #include "http_config.h"
 #include "http_log.h"
 #include "http_request.h"
+#include <string.h>
 
 enum allowdeny_type {
     T_ENV,
index 9159eaa7bde27ab882afb9d85288a84355843ee8..967a58c471bf7e3cb13fe57cfcbe4f67d7d53eb5 100644 (file)
 #include "http_request.h"
 #include "http_log.h"
 #include "http_protocol.h"
-#include "ap_config.h"
 #include "ap_ctype.h"
 #include "util_uri.h"
 #include "util_md5.h"
index 9fa543de956eac6399b7887edbaaca2b86385a59..d622c93de59d966177ff4da31b9b59b41d830550 100644 (file)
@@ -1,3 +1,4 @@
+#include "ap_mmn.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_connection.h"
index c48241bb101dc3c2ad936e66dc0e3e243d538886..2931d805e2d30d6167a663979df6df178761891a 100644 (file)
@@ -92,6 +92,9 @@
 #include "http_log.h"
 #include "http_main.h"
 #include "util_script.h"
+#include <sys/stat.h>
+#include <string.h>
+#include <pwd.h>
 #endif
 
 #define STARTING_SEQUENCE "<!--#"
index f8c4ce5e86453bebf3c6e859bc7eebf17cf6fd88..0dd6fed3b43a13a3f6d0b2ea3f67c64a459ad2f0 100644 (file)
@@ -63,6 +63,8 @@
 #include "http_main.h"
 #include "http_request.h"
 
+#define ASIS_MAGIC_TYPE "httpd/send-as-is"
+
 static int asis_handler(request_rec *r)
 {
     ap_file_t *f = NULL;
index 47ed08791a0e8240c3268096981b69ba6ea083aa..7f3944cad8e32ccdff386d329e0dad9e24a9214e 100644 (file)
@@ -73,6 +73,7 @@
 #include "http_main.h"
 #include "util_script.h"
 #include "apr_fnmatch.h"
+#include <string.h>
 
 module MODULE_VAR_EXPORT autoindex_module;
 
index 3017955501002bfffb8dd0f84fa652e0095eeb35..56b4d0f656f9d00ebe93be737ce0c4b53222896b 100644 (file)
@@ -77,6 +77,8 @@
 #include "http_log.h"
 #include "util_script.h"
 #include "http_conf_globals.h"
+#include <sys/stat.h>
+#include <string.h>
 
 module MODULE_VAR_EXPORT cgi_module;
 
index 0738e281a9b325a51294c4c0303a7fceabb221b6..5cacf4561c6c68c63cacc53e16a14a39dc594552 100644 (file)
  *
  */
 
-#define CORE_PRIVATE
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
 #include "http_protocol.h"
 #include "mpm_status.h"
-#include <time.h>
 
 #ifndef DEFAULT_TIME_FORMAT 
 #define DEFAULT_TIME_FORMAT "%A, %d-%b-%Y %H:%M:%S %Z"
 #endif
 
+#define STATUS_MAGIC_TYPE "application/x-httpd-status"
+
 module MODULE_VAR_EXPORT status_module;
 
 static int print_status_value(void *data, const char *key, const char *val)
index cb31a02651c7881fff0392e56d113b7e722078a2..bf61c0ae0842fddea5ea6a35ba82a56343d9778c 100644 (file)
@@ -69,6 +69,8 @@
 #include "http_log.h"
 #include "http_request.h"
 
+#include <string.h>
+
 typedef struct handlers_info {
     char *name;
 } handlers_info;
@@ -248,7 +250,7 @@ static void mime_post_config(ap_context_t *p, ap_context_t *plog, ap_context_t *
     ap_status_t status;
 
     if (!types_confname)
-        types_confname = TYPES_CONFIG_FILE;
+        types_confname = AP_TYPES_CONFIG_FILE;
 
     types_confname = ap_server_root_relative(p, types_confname);
 
index 885b7c081ea95daebab824bde9286eb5fe21581b..f87139fbe83944221dbd9177840fd94eebca5da5 100644 (file)
@@ -152,7 +152,7 @@ static int handle_dir(request_rec *r)
        num_names = d->index_names->nelts;
     }
     else {
-       dummy_ptr[0] = DEFAULT_INDEX;
+       dummy_ptr[0] = AP_DEFAULT_INDEX;
        names_ptr = dummy_ptr;
        num_names = 1;
     }
index a97dbaa34551ca03d3ea656c37d09b3db3de9db2..579c2f4f13b918d4ce3a2bb1e484ad5794bc6edf 100644 (file)
@@ -99,6 +99,7 @@
 #include "http_main.h"
 #include "http_log.h"
 #include "util_script.h"
+#include <string.h>
 
 #define IMAP_MAGIC_TYPE "application/x-httpd-imap"
 #define MAXVERTS 100
index dc569776e0877ada2459c44991d39a9d77bf1652..531720e242d471bb0711d85efd5c85e7d5f65fb7 100644 (file)
@@ -62,6 +62,7 @@
  * rst
  */
 
+#include "apr_file_io.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
@@ -69,6 +70,9 @@
 #include "http_core.h"
 #include "http_log.h"
 #include "util_script.h"
+#include <string.h>
+
+#define MAP_FILE_MAGIC_TYPE "application/x-type-map"
 
 /* Commands --- configuring document caching on a per (virtual?)
  * server basis... 
@@ -1442,15 +1446,15 @@ static void set_language_quality(negotiation_state *neg, var_rec *variant)
 
 static float find_content_length(negotiation_state *neg, var_rec *variant)
 {
-    struct stat statb;
+    ap_finfo_t statb;
 
     if (variant->bytes == 0) {
         char *fullname = ap_make_full_path(neg->pool, neg->dir_name,
                                            variant->file_name);
 
-        if (stat(fullname, &statb) >= 0) {
+        if (ap_stat(&statb, fullname, neg->pool) == APR_SUCCESS) {
             /* Note, precision may be lost */
-            variant->bytes = (float) statb.st_size;
+            variant->bytes = (float) statb.size;
         }
     }
 
index 877bbf90826fb7a039ac9deddbaaa4b16fffc90e..fc95b3715fe534d842ef7f20b87b27111809de68 100644 (file)
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
+#include <pwd.h>
+
+/* The default directory in user's home dir */
+#ifndef DEFAULT_USER_DIR
+#define DEFAULT_USER_DIR "public_html"
+#endif
 
 module userdir_module;
 
index 287ba61cb042ac035721eeb5499384a14273a08f..3c8c21447825fee45b338ffbd7b9d546f4a3c865 100644 (file)
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
+#include <stdlib.h>
 
 typedef struct {
     ap_table_t *vars;