]> granicus.if.org Git - apache/commitdiff
Manoj has been pushing for this for a while, but I've been too dense
authorRyan Bloom <rbb@apache.org>
Wed, 19 Jan 2000 02:42:17 +0000 (02:42 +0000)
committerRyan Bloom <rbb@apache.org>
Wed, 19 Jan 2000 02:42:17 +0000 (02:42 +0000)
to understand that he was right.  :-)  Basically, this makes the modules
use ap_config to test for header file inclusion.  This method is not to
be used for larger modules that run autoconf theirselves.  Including
ap_config is only valid for modules which rely on Apache to do their
configuration.  Currently, this is only the core modules.

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

16 files changed:
include/httpd.h
modules/aaa/mod_access.c
modules/aaa/mod_auth_db.c
modules/filters/mod_include.c
modules/generators/mod_autoindex.c
modules/generators/mod_cgi.c
modules/http/mod_mime.c
modules/loggers/mod_log_config.c
modules/mappers/mod_imap.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_rewrite.c
modules/mappers/mod_userdir.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_env.c
modules/metadata/mod_expires.c
modules/metadata/mod_mime_magic.c

index decab3910d7823fef45c62741f0f08d21c58409c..3386b786a00dc0c091a590661e6f3da22af0810a 100644 (file)
@@ -377,7 +377,7 @@ enum server_token_type {
 API_EXPORT(const char *) ap_get_server_version(void);
 API_EXPORT(void) ap_add_version_component(const char *component);
 #else
-#define ap_get_server_version()        (SERVER_BASEVERSION)
+#define ap_get_server_version()        (AP_SERVER_BASEVERSION)
 #define ap_add_version_component(x) ((void)0)
 #endif
 API_EXPORT(const char *) ap_get_server_built(void);
index 04645985516935faa15d44afe1860613390cf271..752bbe46a42348b5c0b9fb6385b38a4d05a423eb 100644 (file)
  */
 
 #include "apr_network_io.h"
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_core.h"
 #include "http_config.h"
 #include "http_log.h"
 #include "http_request.h"
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 enum allowdeny_type {
     T_ENV,
index 5d9021f28cd6e64fbb2ff78ab57b5e82619227cb..34657e1ae009ba1f46eb7776ddd91135e523a998 100644 (file)
  *         no control is passed along.
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
 #include "http_log.h"
 #include "http_protocol.h"
+#ifdef HAVE_DB_H
 #include <db.h>
+#endif
 
 #if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 2)
 #define DB2
index 7caef8c28d9f64158c677a8305aed7f7c7b47765..08e2d94c6a010f0190b86af5fb24de5301dedea8 100644 (file)
@@ -84,6 +84,7 @@
 #endif
 #include "modules/perl/mod_perl.h"
 #else
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
@@ -93,7 +94,7 @@
 #include "http_main.h"
 #include "util_script.h"
 #include <string.h>
-#ifndef WIN32
+#ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
 #endif
index 7f3944cad8e32ccdff386d329e0dad9e24a9214e..d439e3acb6322e46c8f4d39fac08718927775b97 100644 (file)
@@ -64,6 +64,7 @@
  * Adapted to Apache by rst.
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
@@ -73,7 +74,9 @@
 #include "http_main.h"
 #include "util_script.h"
 #include "apr_fnmatch.h"
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 module MODULE_VAR_EXPORT autoindex_module;
 
index 56b4d0f656f9d00ebe93be737ce0c4b53222896b..67d419702574545d30bc8af9ad302f5f27525527 100644 (file)
@@ -68,6 +68,7 @@
  * they fail.
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
 #include "http_log.h"
 #include "util_script.h"
 #include "http_conf_globals.h"
+#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 module MODULE_VAR_EXPORT cgi_module;
 
index bf61c0ae0842fddea5ea6a35ba82a56343d9778c..e3478119ea852642f78290c18043eb12a8be09d6 100644 (file)
 
 #define MIME_PRIVATE
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_log.h"
 #include "http_request.h"
-
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 typedef struct handlers_info {
     char *name;
index a25d6253d80750f577e163365f808e2e948b462d..43e8510470a1ce5e558c14cf4b0d715ff43de0b7 100644 (file)
 
 #define DEFAULT_LOG_FORMAT "%h %l %u %t \"%r\" %>s %b"
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"          /* For REMOTE_NAME */
 #include "http_log.h"
 #include "http_protocol.h"
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
+#endif
 
 module MODULE_VAR_EXPORT config_log_module;
 
index 579c2f4f13b918d4ce3a2bb1e484ad5794bc6edf..a6eadbb6f41f053a493fd4f43fec1feda22f083b 100644 (file)
@@ -91,6 +91,7 @@
  * Mark Cox, mark@ukweb.com, Allow relative URLs even when no base specified
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
 #include "http_main.h"
 #include "http_log.h"
 #include "util_script.h"
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 #define IMAP_MAGIC_TYPE "application/x-httpd-imap"
 #define MAXVERTS 100
index 531720e242d471bb0711d85efd5c85e7d5f65fb7..d5301db7e9216a87cbf77001fbdb437af8942df0 100644 (file)
@@ -62,6 +62,7 @@
  * rst
  */
 
+#include "ap_config.h"
 #include "apr_file_io.h"
 #include "httpd.h"
 #include "http_config.h"
@@ -70,7 +71,9 @@
 #include "http_core.h"
 #include "http_log.h"
 #include "util_script.h"
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
 
 #define MAP_FILE_MAGIC_TYPE "application/x-type-map"
 
index 9a46df769152033b92da6972cef55e400a4f4c71..94ef45863dc33a3bb1f876125ede8bbc21bf77cd 100644 (file)
@@ -88,7 +88,7 @@
 **      www.engelschall.com
 */
 
-
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
 
 #ifndef NO_WRITEV
 #ifndef NETWARE
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+#endif
+#ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
 #endif
+#endif
 
 /*
 ** +-------------------------------------------------------+
index 1880406a4b403699fe61af65502f24ae7904784b..ec27429b1310c0ad130b298362b6a0085426d592 100644 (file)
  * disabled, except those explicitly turned on with the "enabled" keyword.
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
-#ifndef WIN32
+#ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
 
index 4e68df1e93ec64c1075f29e8c7bc67641da14375..dc4d0999a93591482564c9dec6ea90268a7a3e48 100644 (file)
  * 29.Jun.96 All directives made per-directory.
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
-#include <sys/types.h>
-#include <sys/stat.h>
 #include "util_script.h"
 #include "http_log.h"
 #include "http_request.h"
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
 
 #define DIR_CMD_PERMS OR_INDEXES
 
index 3c8c21447825fee45b338ffbd7b9d546f4a3c865..1645807d1120eb1d76e3631592c241bd07e39cb2 100644 (file)
  *       *** older versions of the module.                        ***
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
 
 typedef struct {
     ap_table_t *vars;
index 3577bf0c67bf0537e33f1574cf5d3cb88d81a456..b94ec6a261c9f242f0a2ae9a2b2a96d94b787cb8 100644 (file)
  * Hi, welcome to the internet.
  */
 
+#include "ap_config.h"
+#ifdef HAVE_CTYPE_H
 #include <ctype.h>
+#endif
 #include "httpd.h"
 #include "http_config.h"
 #include "http_log.h"
index bf48229402e8b4553809e6257c637c189cb686e7..218ee926847d82f67a396bd7a564f314acf216d8 100644 (file)
  *
  */
 
+#include "ap_config.h"
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
 #include "http_log.h"
 #include "http_protocol.h"
 #include "util_script.h"
-
+#ifdef HAVE_UTIME_H
 #include <utime.h>
-
+#endif
 
 /*
  * data structures and related constants