From: Greg Stein Date: Sun, 26 Nov 2000 04:47:43 +0000 (+0000) Subject: *) Compensate for recent changes in the APR headers. Specifically, some X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49291cd58af0573bf900cdc442b4f65680fc123e;p=apache *) Compensate for recent changes in the APR headers. Specifically, some files need to specifically include stdio.h, or a particular apr_*.h header. *) Adjust callers of apr_create_process() to deal with the extra "const" *) Add "const" to args of ap_os_create_privileged_process() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87080 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mpm.h b/include/ap_mpm.h index 864d69a9c0..491eb6370f 100644 --- a/include/ap_mpm.h +++ b/include/ap_mpm.h @@ -154,13 +154,14 @@ AP_DECLARE(void) ap_start_shutdown(void); * process * @param p The pool to use. */ -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, - const char *progname, - char *const *args, - char **env, - apr_procattr_t *attr, - apr_pool_t *p); +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, + const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, + apr_pool_t *p); #endif diff --git a/include/http_core.h b/include/http_core.h index c66b208a58..18463449cf 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -59,12 +59,18 @@ #ifndef APACHE_HTTP_CORE_H #define APACHE_HTTP_CORE_H +#include "apr.h" + +#if APR_HAVE_STRUCT_RLIMIT +#include +#include +#endif + + #ifdef __cplusplus extern "C" { #endif -#include "apr_lib.h" - /** * @package CORE HTTP Daemon */ diff --git a/include/httpd.h b/include/httpd.h index 6c847f616a..13eed4b069 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -77,12 +77,14 @@ extern "C" { /* Headers in which EVERYONE has an interest... */ #include "ap_config.h" +#include "ap_mmn.h" + #include "os.h" -#include "apr_general.h" -#include "apr_lib.h" + +#include "apr_tables.h" +#include "apr_pools.h" #include "apr_time.h" #include "apr_network_io.h" -#include "ap_mmn.h" #ifdef HAVE_NETINET_IN_H #include diff --git a/modules/dav/fs/lock.c b/modules/dav/fs/lock.c index 2c1c70a84c..f04267ddae 100644 --- a/modules/dav/fs/lock.c +++ b/modules/dav/fs/lock.c @@ -56,12 +56,14 @@ ** DAV filesystem lock implementation */ -#include "httpd.h" -#include "http_log.h" -#include "apr_file_io.h" +#include "apr.h" #include "apr_strings.h" +#include "apr_file_io.h" #include "apr_uuid.h" +#include "httpd.h" +#include "http_log.h" + #include "mod_dav.h" #include "repos.h" @@ -882,7 +884,7 @@ static dav_error * dav_fs_save_locknull_list(apr_pool_t *p, const char *dirpath, if (pbuf->cur_len == 0) { /* delete the file if cur_len == 0 */ - if (remove(pathname) != 0) { + if (apr_remove_file(pathname, p) != 0) { return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, apr_psprintf(p, "Error removing %s", pathname)); diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c index e9c5e9161c..b58caaf9d6 100644 --- a/modules/dav/fs/repos.c +++ b/modules/dav/fs/repos.c @@ -56,9 +56,14 @@ ** DAV filesystem-based repository provider */ +#include "apr.h" #include "apr_file_io.h" #include "apr_strings.h" +#if APR_HAVE_STDIO_H +#include /* for sprintf() */ +#endif + #include "httpd.h" #include "http_log.h" #include "http_protocol.h" /* for ap_set_* (in dav_fs_set_headers) */ @@ -349,7 +354,7 @@ static dav_error * dav_fs_copymove_file( apr_close(inf); apr_close(outf); - if (remove(dst) != 0) { + if (apr_remove_file(dst, p) != 0) { /* ### ACK! Inconsistent state... */ /* ### use something besides 500? */ diff --git a/modules/dav/main/props.c b/modules/dav/main/props.c index 08a50b3f80..21c020adae 100644 --- a/modules/dav/main/props.c +++ b/modules/dav/main/props.c @@ -178,11 +178,17 @@ ** entries from the property database. */ +#include "apr.h" +#include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for sprintf() */ +#endif + #include "mod_dav.h" #include "http_log.h" #include "http_request.h" -#include "apr_strings.h" /* ** There is some rough support for writable DAV:getcontenttype and diff --git a/modules/dav/main/util_lock.c b/modules/dav/main/util_lock.c index 4c23d5e595..3a138dd16f 100644 --- a/modules/dav/main/util_lock.c +++ b/modules/dav/main/util_lock.c @@ -56,13 +56,18 @@ ** DAV repository-independent lock functions */ +#include "apr.h" +#include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for sprintf() */ +#endif + #include "mod_dav.h" #include "http_log.h" #include "http_config.h" #include "http_protocol.h" #include "http_core.h" -#include "apr_strings.h" -#include "memory.h" /* --------------------------------------------------------------- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 350dadc965..b7d83d9307 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -76,13 +76,16 @@ * -Doug MacEachern */ +#include "apr.h" +#include "apr_strings.h" +#include "apr_thread_proc.h" + #define CORE_PRIVATE #ifdef USE_PERL_SSI #include "config.h" #include "modules/perl/mod_perl.h" #else -#include "apr_strings.h" #include "ap_config.h" #include "util_filter.h" #include "httpd.h" @@ -1083,7 +1086,9 @@ static int include_cmd(include_ctx_t *ctx, ap_bucket_brigade **bb, char *s, build_argv_list(&argv, r, r->pool); argv[0] = apr_pstrdup(r->pool, s); procnew = apr_pcalloc(r->pool, sizeof(*procnew)); - rc = apr_create_process(procnew, s, argv, ap_create_environment(r->pool, env), procattr, r->pool); + rc = apr_create_process(procnew, s, (const char * const *) argv, + (const char * const *)ap_create_environment(r->pool, env), + procattr, r->pool); if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. */ diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index cd448dc294..b16d67c2d7 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -69,9 +69,12 @@ * they fail. */ +#include "apr.h" +#include "apr_strings.h" +#include "apr_thread_proc.h" /* for RLIMIT stuff */ + #define CORE_PRIVATE -#include "apr_strings.h" #include "ap_buckets.h" #include "util_filter.h" #include "ap_config.h" diff --git a/modules/http/http_core.c b/modules/http/http_core.c index f6c7e99c19..e3c5cf2c10 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -56,10 +56,18 @@ * University of Illinois, Urbana-Champaign. */ -#define CORE_PRIVATE -#include "ap_config.h" +#include "apr.h" #include "apr_strings.h" #include "apr_lib.h" +#include "apr_fnmatch.h" +#include "apr_thread_proc.h" /* for RLIMIT stuff */ + +#if APR_HAVE_SYS_UIO_H +#include /* for iovec */ +#endif + +#define CORE_PRIVATE +#include "ap_config.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" @@ -70,12 +78,12 @@ #include "http_log.h" #include "rfc1413.h" #include "util_md5.h" -#include "apr_fnmatch.h" #include "http_connection.h" #include "ap_buckets.h" #include "util_filter.h" #include "util_ebcdic.h" #include "mpm.h" + #ifdef HAVE_NETDB_H #include #endif @@ -2524,7 +2532,8 @@ static const char *set_limit_nproc(cmd_parms *cmd, void *conf_, } #endif -static apr_status_t writev_it_all(apr_socket_t *s, struct iovec *vec, int nvec, +static apr_status_t writev_it_all(apr_socket_t *s, + struct iovec *vec, int nvec, apr_size_t len, apr_size_t *nbytes) { apr_size_t bytes_written = 0; diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 82ce9ab4f2..0e09767940 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -63,11 +63,20 @@ * and the Apache Software Foundation. */ +#include "apr.h" +#include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for EOF, sscanf() */ +#endif +#if APR_HAVE_STDARG_H +#include +#endif + #define CORE_PRIVATE #include "ap_buckets.h" #include "util_filter.h" #include "ap_config.h" -#include "apr_strings.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" @@ -81,9 +90,7 @@ #include "util_charset.h" #include "util_ebcdic.h" #include "mpm_status.h" -#ifdef APR_HAVE_STDARG_H -#include -#endif + #ifdef HAVE_UNISTD_H #include #endif diff --git a/modules/mappers/mod_imap.c b/modules/mappers/mod_imap.c index dca681fc64..7a1eb078ba 100644 --- a/modules/mappers/mod_imap.c +++ b/modules/mappers/mod_imap.c @@ -92,7 +92,13 @@ * Mark Cox, mark@ukweb.com, Allow relative URLs even when no base specified */ +#include "apr.h" #include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for sscanf() */ +#endif + #include "ap_config.h" #include "httpd.h" #include "http_config.h" diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index c8919fcbb6..b4852266ac 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -63,9 +63,15 @@ * rst */ -#include "ap_config.h" +#include "apr.h" #include "apr_strings.h" #include "apr_file_io.h" + +#if APR_HAVE_STDIO_H +#include /* for EOF */ +#endif + +#include "ap_config.h" #include "httpd.h" #include "http_config.h" #include "http_request.h" diff --git a/modules/mappers/mod_so.c b/modules/mappers/mod_so.c index 2d48e2e808..9ba7f6851a 100644 --- a/modules/mappers/mod_so.c +++ b/modules/mappers/mod_so.c @@ -125,6 +125,10 @@ * */ +#include "apr.h" +#include "apr_dso.h" +#include "apr_strings.h" +#include "apr_errno.h" #define CORE_PRIVATE #include "ap_config.h" @@ -132,8 +136,6 @@ #include "http_config.h" #include "http_log.h" #include "ap_config.h" -#include "apr_dso.h" -#include "apr_strings.h" module AP_MODULE_DECLARE_DATA so_module; diff --git a/os/beos/os.c b/os/beos/os.c index b040432a1f..a0600b8e22 100644 --- a/os/beos/os.c +++ b/os/beos/os.c @@ -70,10 +70,12 @@ int ap_os_is_path_absolute(const char *file) return file[0] == '/'; } -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { return apr_create_process(newproc, progname, args, env, attr, p); } diff --git a/os/bs2000/os.c b/os/bs2000/os.c index 72f7664057..088230b68b 100644 --- a/os/bs2000/os.c +++ b/os/bs2000/os.c @@ -103,10 +103,12 @@ int ap_checkconv(struct request_rec *r) return convert_to_ascii; } -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { return apr_create_process(newproc, progname, args, env, attr, p); } diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c index 637eca4642..06751dd669 100644 --- a/os/os2/util_os2.c +++ b/os/os2/util_os2.c @@ -171,10 +171,12 @@ char *ap_os_canonical_filename(apr_pool_t *pPool, const char *szFile) return szCanonicalFile; } -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { return apr_create_process(newproc, progname, args, env, attr, p); } diff --git a/os/tpf/os.c b/os/tpf/os.c index cc0633d6d7..f357228ebc 100644 --- a/os/tpf/os.c +++ b/os/tpf/os.c @@ -412,10 +412,12 @@ void os_tpf_child(APACHE_TPF_INPUT *input_parms) { ap_restart_time = input_parms->restart_time; } -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { return apr_create_process(newproc, progname, args, env, attr, p); } diff --git a/os/unix/unixd.c b/os/unix/unixd.c index 1b8a465ab8..2ef1f58a66 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -427,12 +427,13 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(ap_unix_identity_t *, get_suexec_identity, static apr_status_t ap_unix_create_privileged_process( apr_proc_t *newproc, const char *progname, - char *const *args, char **env, + const char * const *args, + const char * const *env, apr_procattr_t *attr, ap_unix_identity_t *ugid, apr_pool_t *p) { int i = 0; - char **newargs; + const char **newargs; char *newprogname; char *execuser, *execgroup; @@ -468,10 +469,12 @@ static apr_status_t ap_unix_create_privileged_process( return apr_create_process(newproc, newprogname, newargs, env, attr, p); } -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { ap_unix_identity_t *ugid = ap_run_get_suexec_identity(r); diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c index c3395af0d5..f7346c123c 100644 --- a/os/win32/util_win32.c +++ b/os/win32/util_win32.c @@ -507,10 +507,12 @@ AP_DECLARE(int) ap_os_is_filename_valid(const char *file) } #endif -AP_DECLARE(apr_status_t) ap_os_create_privileged_process(const request_rec *r, - apr_proc_t *newproc, const char *progname, - char *const *args, char **env, - apr_procattr_t *attr, apr_pool_t *p) +AP_DECLARE(apr_status_t) ap_os_create_privileged_process( + const request_rec *r, + apr_proc_t *newproc, const char *progname, + const char * const *args, + const char * const *env, + apr_procattr_t *attr, apr_pool_t *p) { return apr_create_process(newproc, progname, args, env, attr, p); } diff --git a/server/config.c b/server/config.c index 358f32a25c..0d78b7e914 100644 --- a/server/config.c +++ b/server/config.c @@ -71,12 +71,18 @@ * */ +#include "apr.h" +#include "apr_strings.h" +#include "apr_portable.h" +#include "apr_file_io.h" + +#if APR_HAVE_STDIO_H +#include +#endif + #define CORE_PRIVATE #include "ap_config.h" -#include "apr_portable.h" -#include "apr_strings.h" -#include "apr_file_io.h" #include "httpd.h" #include "http_config.h" #include "http_protocol.h" diff --git a/server/gen_test_char.c b/server/gen_test_char.c index 52d1782099..c03215b2a3 100644 --- a/server/gen_test_char.c +++ b/server/gen_test_char.c @@ -56,9 +56,15 @@ * University of Illinois, Urbana-Champaign. */ +#include "apr.h" +#include "apr_lib.h" + +#if APR_HAVE_STDIO_H +#include +#endif + /* we need some of the portability definitions... for strchr */ #include "ap_config.h" -#include "apr_lib.h" #include "httpd.h" /* A bunch of functions in util.c scan strings looking for certain characters. diff --git a/server/log.c b/server/log.c index e3158b5206..7a67f6b39d 100644 --- a/server/log.c +++ b/server/log.c @@ -63,22 +63,28 @@ * */ +#include "apr.h" +#include "apr_general.h" /* for signal stuff */ +#include "apr_strings.h" +#include "apr_errno.h" +#include "apr_thread_proc.h" + +#if APR_HAVE_STDIO_H +#include +#endif +#if APR_HAVE_STDARG_H +#include +#endif #define CORE_PRIVATE -#include "apr.h" /* for apr_signal */ + #include "ap_config.h" -#include "apr_strings.h" -#include "apr_lib.h" -#include "apr_portable.h" #include "httpd.h" #include "http_config.h" #include "http_core.h" #include "http_log.h" #include "http_main.h" -#ifdef APR_HAVE_STDARG_H -#include -#endif #ifdef HAVE_STRINGS_H #include #endif @@ -199,7 +205,8 @@ static int log_child(apr_pool_t *p, const char *progname, apr_tokenize_to_argv(progname, &args, p); pname = apr_pstrdup(p, args[0]); procnew = (apr_proc_t *) apr_pcalloc(p, sizeof(*procnew)); - rc = apr_create_process(procnew, pname, args, NULL, procattr, p); + rc = apr_create_process(procnew, pname, (const char * const *)args, + NULL, procattr, p); if (rc == APR_SUCCESS) { apr_note_subprocess(p, procnew, kill_after_timeout); @@ -589,7 +596,8 @@ static int piped_log_spawn(piped_log *pl) apr_tokenize_to_argv(pl->program, &args, pl->p); pname = apr_pstrdup(pl->p, args[0]); procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t)); - rc = apr_create_process(procnew, pname, args, NULL, procattr, pl->p); + rc = apr_create_process(procnew, pname, (const char * const *) args, + NULL, procattr, pl->p); if (rc == APR_SUCCESS) { /* pjr - This no longer happens inside the child, */ diff --git a/server/main.c b/server/main.c index 29cdb14449..57cf359062 100644 --- a/server/main.c +++ b/server/main.c @@ -56,6 +56,15 @@ * University of Illinois, Urbana-Champaign. */ +#include "apr.h" +#include "apr_strings.h" +#include "apr_getopt.h" +#include "apr_general.h" + +#if APR_HAVE_STDIO_H +#include +#endif + #define CORE_PRIVATE #include "ap_config.h" #include "httpd.h" @@ -65,8 +74,6 @@ #include "http_vhost.h" #include "util_uri.h" #include "util_ebcdic.h" -#include "apr_strings.h" -#include "apr_getopt.h" #include "ap_mpm.h" /* WARNING: Win32 binds http_main.c dynamically to the server. Please place diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 80183a8ce1..6bee0821c6 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -85,12 +85,24 @@ * TODO: - clean up scoreboard stuff when we figure out how to do it in 2.0 */ -#define CORE_PRIVATE - -#include "ap_config.h" +#include "apr.h" #include "apr_portable.h" #include "apr_strings.h" #include "apr_thread_proc.h" + +#if APR_HAVE_STDIO_H +#include /* for perror() */ +#endif +#if APR_HAVE_SYS_WAIT_H +#include +#endif +#if APR_HAVE_SYS_SOCKET_H +#include +#endif + +#define CORE_PRIVATE + +#include "ap_config.h" #include "httpd.h" #include "mpm_default.h" #include "mpm_status.h" @@ -108,12 +120,6 @@ #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_UNISTD_H #include #endif @@ -130,6 +136,7 @@ #ifdef HAVE_TIME_H #include #endif + #include #include diff --git a/server/mpm_common.c b/server/mpm_common.c index e9e2727e84..8708a10c91 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -67,20 +67,16 @@ * does not belong in src/os/unix */ +#include "apr.h" #include "apr_thread_proc.h" +#include "apr_general.h" /* for signal stuff */ + #include "httpd.h" #include "http_config.h" #include "http_log.h" #include "mpm.h" #include "mpm_common.h" -#if HAVE_SYS_TIME_H -#include /* for timeval definitions */ -#endif -#if HAVE_SYS_SOCKET_H -#include /* for setsockopt prototype */ -#endif - #ifdef MPM_NEEDS_RECLAIM_CHILD_PROCESSES void ap_reclaim_child_processes(int terminate) { diff --git a/server/rfc1413.c b/server/rfc1413.c index 23e29be5fb..9f811c8b12 100644 --- a/server/rfc1413.c +++ b/server/rfc1413.c @@ -79,16 +79,24 @@ /* Rewritten by David Robinson */ +#include "apr.h" +#include "apr_network_io.h" + +#if APR_HAVE_STDIO_H +#include +#endif + #include "ap_config.h" + +#ifdef HAVE_STRING_H +#include +#endif + #include "httpd.h" /* for server_rec, conn_rec, etc. */ #include "http_log.h" /* for aplog_error */ #include "rfc1413.h" #include "http_main.h" /* set_callback_and_alarm */ #include "util_ebcdic.h" -#include "apr_network_io.h" -#ifdef HAVE_STRING_H -#include -#endif /* Local stuff. */ /* Semi-well-known port */ diff --git a/server/util.c b/server/util.c index a05443f25e..f4911c9b38 100644 --- a/server/util.c +++ b/server/util.c @@ -71,9 +71,21 @@ #define CORE_PRIVATE +#include "apr.h" +#include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for EOF */ +#endif +#if APR_HAVE_NETINET_IN_H +#include +#endif +#if APR_HAVE_SYS_SOCKET_H +#include +#endif + #include "ap_config.h" #include "ap_base64.h" -#include "apr_strings.h" #include "httpd.h" #include "http_main.h" #include "http_log.h" @@ -81,18 +93,9 @@ #include "http_config.h" #include "util_ebcdic.h" -#ifdef HAVE_STDIO_H -#include -#endif #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif #ifdef HAVE_NETDB_H #include #endif diff --git a/server/util_xml.c b/server/util_xml.c index 3aa7afc58c..bcc5cda57b 100644 --- a/server/util_xml.c +++ b/server/util_xml.c @@ -60,11 +60,17 @@ /* James Clark's Expat parser */ #include "xmlparse.h" +#include "apr.h" +#include "apr_strings.h" + +#if APR_HAVE_STDIO_H +#include /* for fprintf(), sprintf() */ +#endif + #include "httpd.h" #include "http_protocol.h" #include "http_log.h" #include "http_core.h" -#include "apr_strings.h" #include "util_xml.h" diff --git a/support/ab.c b/support/ab.c index 668b87384d..643a79506a 100644 --- a/support/ab.c +++ b/support/ab.c @@ -113,11 +113,18 @@ /* affects include files on Solaris */ #define BSD_COMP +#include "apr.h" +#include "apr_strings.h" #include "apr_network_io.h" #include "apr_file_io.h" #include "apr_time.h" #include "apr_getopt.h" -#include "apr_strings.h" +#include "apr_general.h" + +#if APR_HAVE_STDIO_H +#include /* for EOF */ +#endif + #include "ap_base64.h" #ifdef NOT_ASCII #include "apr_xlate.h" @@ -886,14 +893,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.36 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.37 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AB_VERSION, "$Revision: 1.36 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AB_VERSION, "$Revision: 1.37 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n"); diff --git a/support/htdigest.c b/support/htdigest.c index 73cb59199c..c7a179ae76 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -64,8 +64,15 @@ * by Alexei Kosut, based on htpasswd.c, by Rob McCool */ -#include "apr_lib.h" +#include "apr.h" +#include "apr_file_io.h" #include "apr_md5.h" +#include "apr_lib.h" /* for apr_getpass() */ +#include "apr_general.h" + +#if APR_HAVE_STDIO_H +#include +#endif #ifdef HAVE_SYS_TYPES_H #include diff --git a/support/htpasswd.c b/support/htpasswd.c index 820cf78bf0..77e6bdc915 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -79,9 +79,15 @@ * 6: Failure; username contains illegal or reserved characters */ +#include "apr.h" #include "apr_strings.h" -#include "apr_lib.h" #include "apr_errno.h" +#include "apr_file_io.h" + +#if APR_HAVE_STDIO_H +#include +#endif + #include "ap_config.h" #include "apr_md5.h" #include "ap_sha1.h"