]> granicus.if.org Git - apache/commitdiff
Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
authorRyan Bloom <rbb@apache.org>
Mon, 12 Jun 2000 21:47:17 +0000 (21:47 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 12 Jun 2000 21:47:17 +0000 (21:47 +0000)
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.

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

24 files changed:
STATUS
include/ap_config.h
modules/aaa/mod_access.c
modules/aaa/mod_auth_db.c
modules/aaa/mod_auth_dbm.c
modules/generators/mod_cgid.c
modules/http/http_core.c
modules/http/http_protocol.c
modules/loggers/mod_log_config.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_rewrite.h
modules/mappers/mod_vhost_alias.c
modules/metadata/mod_mime_magic.c
modules/metadata/mod_unique_id.c
os/unix/unixd.c
server/connection.c
server/mpm/dexter/dexter.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/prefork/prefork.c
server/util.c
server/util_uri.c
server/vhost.c
support/logresolve.c
support/rotatelogs.c

diff --git a/STATUS b/STATUS
index 50359a2951e23e7f2bf8ae06b37904081fa9beff..023cd9548aa9a09a52a0d3e142a17e37a00b4cda 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 Apache 2.0 STATUS:
-Last modified at [$Date: 2000/06/12 17:28:48 $]
+Last modified at [$Date: 2000/06/12 21:46:35 $]
 
 Release:
 
@@ -31,10 +31,6 @@ RELEASE SHOWSTOPPERS:
           to -ldl which is wrong).
         Status:
 
-      - reduce number of configuration items, which in turn reduces the
-          amount of stuff in ap_config_auto.h.in
-        Status: Ryan +1 (working on it), Greg +1
-
     * suEXEC doesn't work
         Status: Manoj has posted an patch to fix this.
         <19991103003605.A20612@samosa.mindspring.com>
index 852ede7d80e869b380bf40104904d5a30bcd6a1c..dd64c4a1c22fe6fee18dfef34624c56d264041fb 100644 (file)
@@ -104,48 +104,6 @@ extern "C" {
 #include <string.h>
 #endif
 
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
-/* The next three are for inet_*() */
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-#ifdef HAVE_PWD_H    /* XXX - For getpw*. This should be moved to unixd */
-#include <pwd.h>
-#endif
-
-#ifdef HAVE_GRP_H    /* XXX - For getgr*. This should be moved to unixd */
-#include <grp.h>
-#endif
-
 /* ap_ versions of ctype macros to make sure they deal with 8-bit chars */
 #include "ap_ctype.h"
 
@@ -166,29 +124,6 @@ extern "C" {
 #define ap_sigwait(a,b) sigwait((a),(b))
 #endif
 
-/* So that we can use inline on some critical functions, and use
- * GNUC attributes (such as to get -Wall warnings for printf-like
- * functions).  Only do this in gcc 2.7 or later ... it may work
- * on earlier stuff, but why chance it.
- *
- * We've since discovered that the gcc shipped with NeXT systems
- * as "cc" is completely broken.  It claims to be __GNUC__ and so
- * on, but it doesn't implement half of the things that __GNUC__
- * means.  In particular it's missing inline and the __attribute__
- * stuff.  So we hack around it.  PR#1613. -djg
- */
-#if !defined(__GNUC__) || __GNUC__ < 2 || \
-    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
-    defined(NEXT)
-#define ap_inline
-#define __attribute__(__x)
-#define ENUM_BITFIELD(e,n,w)  signed int n : w
-#else
-#define ap_inline __inline__
-#define USE_GNU_INLINE
-#define ENUM_BITFIELD(e,n,w)  e n : w
-#endif
-
 /* EAGAIN apparently isn't defined on some systems */
 #if !defined(HAVE_EAGAIN) && !defined(EAGAIN)
 #define EAGAIN EWOULDBLOCK
@@ -216,19 +151,10 @@ extern "C" {
 #endif
 
 #ifdef SCO5
-/* XXX - What's this for */
-#define SecureWare
-
-/* Although SCO 5 defines these in <strings.h> (note the "s") they don't have
-   consts. Sigh. */
-extern int strcasecmp(const char *, const char *);
-extern int strncasecmp(const char *, const char *, unsigned);
-#endif /* SCO5 */
-
-/* If APR has OTHER_CHILD logic, use reliable piped logs.
+/* This allows Apache to run from a startup script on a SCO box in high
+ * security (C2) mode.  
  */
-#if (APR_HAS_OTHER_CHILD)
-#define HAVE_RELIABLE_PIPED_LOGS TRUE
+#define SecureWare
 #endif
 
 /* XXX - The PHP4 comments say -D_HPUX_SOURCE is obsolete. */
@@ -251,6 +177,12 @@ extern int strncasecmp(const char *, const char *, unsigned);
 #define USE_MEM_BASED_SCOREBOARD
 #endif
 
+/* If APR has OTHER_CHILD logic, use reliable piped logs.
+ */
+#if (APR_HAS_OTHER_CHILD)
+#define HAVE_RELIABLE_PIPED_LOGS TRUE
+#endif
+
 #if defined(CHARSET_EBCDIC) && !defined(APACHE_XLATE)
 #define APACHE_XLATE
 #endif
index 78c669f66f52618f8fbb6eae9818260564e4d4a6..f1f77b4e36fa8a6f3542feed7e4c83c38d5763e2 100644 (file)
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
 
 enum allowdeny_type {
     T_ENV,
index 1d325f922e84bc4d669033923e590174f373d5a4..c0fb3115ac2cfe9c9e8e765471a5c82d1a198b42 100644 (file)
@@ -99,6 +99,7 @@
 #include "http_core.h"
 #include "http_log.h"
 #include "http_protocol.h"
+#include "http_request.h"  /* for ap_hook_(check_user_id | auth_check) */
 #ifdef HAVE_DB_H
 #include <db.h>
 #endif
@@ -319,10 +320,10 @@ static int db_authenticate_basic_user(request_rec *r)
     invalid_pw = ap_validate_password(sent_pw, real_pw);
 
     if (invalid_pw != APR_SUCCESS) {
-        char buf[120]
        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
-                     "DB user %s: authentication failure for \"%s\": %s",
-                     r->user, r->uri, ap_strerror(invalid_pw, buf, sizeof(buf)));
+                     "DB user %s: authentication failure for \"%s\": "
+                      "Password Mismatch",
+                     r->user, r->uri);
        ap_note_basic_auth_failure(r);
        return AUTH_REQUIRED;
     }
index d9e304bca2998801850d9bb76708144638fbc93b..20317f9ddbb7ff8beaec16d35017ad0acb33e22e 100644 (file)
@@ -75,6 +75,7 @@
 #include "http_core.h"
 #include "http_log.h"
 #include "http_protocol.h"
+#include "http_request.h"   /* for ap_hook_(check_user_id | auth_checker)*/
 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
     && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
 #include <db1/ndbm.h>
@@ -239,8 +240,9 @@ static int dbm_authenticate_basic_user(request_rec *r)
     invalid_pw = ap_validate_password(sent_pw, real_pw);
     if (invalid_pw != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
-                     "DBM user %s: authentication failure for \"%s\": %s",
-                     r->user, r->uri, invalid_pw);
+                     "DBM user %s: authentication failure for \"%s\": "
+                      "Password Mismatch",
+                     r->user, r->uri);
        ap_note_basic_auth_failure(r);
        return AUTH_REQUIRED;
     }
index 231230bd15cd2d4bdfe0dc40ae1aa3de3b56e4d8..0d8cecfe50435cb89b9b577f1dab9a09da4f559f 100644 (file)
@@ -90,6 +90,8 @@
 #include "ap_mpm.h"
 #include "iol_socket.h"
 #include "unixd.h"
+#include <sys/stat.h>
+#include <sys/socket.h> /* for sockaddr_un */
 #include <sys/un.h> /* for sockaddr_un */
 #include <sys/types.h>
 #include <sys/stat.h>
index ea5617a6daf51925f536c57a3445d7901c4803a0..56de44efc5565ba9e0719bf3cea77127a188c3b2 100644 (file)
@@ -73,6 +73,7 @@
 #include "http_connection.h"
 #include "util_ebcdic.h"
 #include "mpm.h"
+#include <netdb.h>
 
 /* Allow Apache to use ap_mmap */
 #ifdef USE_MMAP_FILES
index 04328179e960915ee4cf4a7b52544f33016f5706..ba47c9b6a657231c536e0261cad0b71046c3c4b7 100644 (file)
@@ -78,6 +78,7 @@
 #include "util_charset.h"
 #include "mpm_status.h"
 #include <stdarg.h>
+#include <unistd.h>
 
 AP_HOOK_STRUCT(
            AP_HOOK_LINK(post_read_request)
index 07271899414ef67c5180504f3e60090911118003..02c55300eaa01eac2b775e2a6c65a6cbebef0965 100644 (file)
 #include "http_core.h"          /* For REMOTE_NAME */
 #include "http_log.h"
 #include "http_protocol.h"
+#include <unistd.h>
 #ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
index 1c6c0a1518448ca481a553b238625da13fd09b86..22c41926e0809927c20be7641d0950c3c66dede6 100644 (file)
 #include <sys/uio.h>
 #endif
 #endif
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 /*
 ** +-------------------------------------------------------+
index a233ebc8c528da64f5edb5f61be0051cdc9dd6e2..f6b66906ca9c51086bd34c53aa20a3db73003b0e 100644 (file)
@@ -450,7 +450,7 @@ static void   store_cache_string(cache *c, char *res, cacheentry *ce);
 static char  *subst_prefix_path(request_rec *r, char *input, char *match,
                                 char *subst);
 static int    parseargline(char *str, char **a1, char **a2, char **a3);
-static int    prefix_stat(const char *path, struct stat *sb);
+static int    prefix_stat(const char *path, ap_finfo_t *sb);
 static void   add_env_variable(request_rec *r, char *s);
 
     /* Lexicographic Comparison */
index c5d37832145c095f65a338938e23c0d84531c082..9d6a258e0f8ae581dca50f32ca3fe5a708adb38a 100644 (file)
  * both written by James Grinter <jrg@blodwen.demon.co.uk>.
  */
 
+#include "ap_hooks.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
+#include "http_request.h"  /* for ap_hook_translate_name */
 
 
 module MODULE_VAR_EXPORT vhost_alias_module;
index 29d28fb74ec6e93686ccaa8cc046f15a082b43c2..892b226b4c5438f009f2a6b69a6ffa11eb176eb0 100644 (file)
 #include "http_log.h"
 #include "http_protocol.h"
 #include "util_script.h"
+#include <sys/stat.h>
+#include <unistd.h>
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
@@ -2155,7 +2157,6 @@ static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt,
     ap_pool_t *child_context = cntxt;
     ap_procattr_t *procattr;
     ap_proc_t *procnew = NULL;
-    ap_file_t *file = NULL;
     ap_iol *iol;
 
     env = ap_create_environment(child_context, r->subprocess_env);
@@ -2179,7 +2180,7 @@ static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt,
             close(STDERR_FILENO);
         }
 
-        rc = ap_create_process(&procnew, compr[parm->method].argv[0],
+        rc = ap_create_process(procnew, compr[parm->method].argv[0],
                                new_argv, env, procattr, child_context);
 
         if (rc != APR_SUCCESS) {
@@ -2191,8 +2192,7 @@ static int uncompress_child(struct uncompress_parms *parm, ap_pool_t *cntxt,
         else {
             ap_note_subprocess(child_context, procnew, kill_after_timeout);
             /* Fill in BUFF structure for parents pipe to child's stdout */
-            ap_get_childout(&file, procnew);
-            iol = ap_create_file_iol(file);
+            iol = ap_create_file_iol(procnew->out);
             if (!iol)
                 return APR_EBADF;
             if (script_in) {
index b2d42fcec41f8146d51e37b9d61d923e18fbb318..bce1c56472706a23167be1810e0cc0bd885dd6b1 100644 (file)
 #include "httpd.h"
 #include "http_config.h"
 #include "http_log.h"
+#include "http_protocol.h"  /* for ap_hook_post_read_request */
+
+#include <netdb.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 
 typedef struct {
     unsigned int stamp;
index 5a933a8531da62abd1ab23426496d86641bda63b..675786249c343f49c4be52dba0e48108b71af307 100644 (file)
@@ -65,6 +65,8 @@
 #include <pwd.h>
 #include <sys/resource.h>
 #include <sys/resource.h>
+#include <unistd.h>
+#include <grp.h>
 
 unixd_config_rec unixd_config;
 
index 1967107c5a9af9a61e2027a115214aec789c1d50..7c9e0e646a6feec66e8beba3109d9b42048ca71f 100644 (file)
@@ -67,6 +67,9 @@
 #include "http_config.h"
 #include "http_vhost.h"
 
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
 AP_HOOK_STRUCT(
            AP_HOOK_LINK(pre_connection)
            AP_HOOK_LINK(process_connection)
index 9e33083cf1946ca41f791fe81507ff073405339d..29a8a0875f0fa5bd6ebb0c0ee84cd357deeab20f 100644 (file)
@@ -76,7 +76,9 @@
 #include "mpm.h"
 #include "scoreboard.h"
 
+#include <unistd.h>
 #include <poll.h>
+#include <sys/socket.h>
 #ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
index 40935bc2c35d80638aad3873a035a4d962a9d1e1..a23df678e8248a626b71dcd823e2f7f720abfd4d 100644 (file)
@@ -78,6 +78,7 @@
 #ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
 #endif
+#include <sys/socket.h> 
 #include <sys/wait.h> 
 #include <pthread.h>
 #include <signal.h>
index 7e21d6c42d9899844b3ad06d86a23de7f943bb86..d1aeaefde27e7fc4083f496346e0ee7aa68fbfe9 100644 (file)
 #include <sys/times.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <sys/socket.h>
+#include <unistd.h>
 
 #ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>       /* for TCP_NODELAY */
index 0ae566addb9c55ba2625d339af0efc29bf42d95c..57cd73fb25b8fcf98ab8f2147418bead7008aba4 100644 (file)
 #include "http_config.h"
 #include "util_ebcdic.h"
 
-#if defined(SUNOS4)
-/* stdio.h has been read in ap_config.h already. Add missing prototypes here: */
-extern int fgetc(FILE *);
-extern char *fgets(char *s, int, FILE*);
-extern int fclose(FILE *);
+#include <stdio.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#ifdef HAVE_PWD_H
+#include <pwd.h>
 #endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+
 
 /* A bunch of functions in util.c scan strings looking for certain characters.
  * To make that more efficient we encode a lookup table.  The test_char_table
index 07da60f29b88b5151c9b7ca28539389108e593ef..79630e385f40a4e92ddd97d395049c054d7a0480 100644 (file)
@@ -66,6 +66,7 @@
 #include "http_log.h"
 #include "util_uri.h"
 #include <string.h>
+#include <netdb.h>
 
 /* Some WWW schemes and their default ports; this is basically /etc/services */
 /* This will become global when the protocol abstraction comes */
index 8e1158cd383ffb8bb358897174c6b7e07902a82f..291a5b762c0dff7a4e6d9cf697c727dc6555f065 100644 (file)
 #include "http_protocol.h"
 #include "http_core.h"
 
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
 /*
  * After all the definitions there's an explanation of how it's all put
  * together.
index c9f8ca2ccfd5323a7df760943d1d508fa5ba1d01..78aa64a8ee6cb4ac3d55d14e36b95b4f48816c48 100644 (file)
@@ -42,6 +42,7 @@
 #include "ap_config.h"
 #include <ctype.h>
 #include <stdio.h>
+#include <netdb.h>
 
 #if !defined(MPE) && !defined(BEOS) && !defined(WIN32)
 #include <arpa/inet.h>
index 404aca811bc04002ab46358d1fe4b0150612d02b..6d1b9267e26e203cd4fe5c9c27570b5bd55c5faa 100644 (file)
@@ -67,6 +67,7 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 
 #define BUFSIZE                65536