* 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
#ifndef APACHE_HTTP_CORE_H
#define APACHE_HTTP_CORE_H
+#include "apr.h"
+
+#if APR_HAVE_STRUCT_RLIMIT
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
+
#ifdef __cplusplus
extern "C" {
#endif
-#include "apr_lib.h"
-
/**
* @package CORE HTTP Daemon
*/
/* 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 <netinet/in.h>
** 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"
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));
** DAV filesystem-based repository provider
*/
+#include "apr.h"
#include "apr_file_io.h"
#include "apr_strings.h"
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* for sprintf() */
+#endif
+
#include "httpd.h"
#include "http_log.h"
#include "http_protocol.h" /* for ap_set_* (in dav_fs_set_headers) */
apr_close(inf);
apr_close(outf);
- if (remove(dst) != 0) {
+ if (apr_remove_file(dst, p) != 0) {
/* ### ACK! Inconsistent state... */
/* ### use something besides 500? */
** entries from the property database.
*/
+#include "apr.h"
+#include "apr_strings.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* 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
** DAV repository-independent lock functions
*/
+#include "apr.h"
+#include "apr_strings.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* 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"
/* ---------------------------------------------------------------
* -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"
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. */
* 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"
* 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 <sys/uio.h> /* for iovec */
+#endif
+
+#define CORE_PRIVATE
+#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_core.h"
#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 <netdb.h>
#endif
}
#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;
* and the Apache Software Foundation.
*/
+#include "apr.h"
+#include "apr_strings.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* for EOF, sscanf() */
+#endif
+#if APR_HAVE_STDARG_H
+#include <stdarg.h>
+#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"
#include "util_charset.h"
#include "util_ebcdic.h"
#include "mpm_status.h"
-#ifdef APR_HAVE_STDARG_H
-#include <stdarg.h>
-#endif
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
* 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 <stdio.h> /* for sscanf() */
+#endif
+
#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
* rst
*/
-#include "ap_config.h"
+#include "apr.h"
#include "apr_strings.h"
#include "apr_file_io.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* for EOF */
+#endif
+
+#include "ap_config.h"
#include "httpd.h"
#include "http_config.h"
#include "http_request.h"
*
*/
+#include "apr.h"
+#include "apr_dso.h"
+#include "apr_strings.h"
+#include "apr_errno.h"
#define CORE_PRIVATE
#include "ap_config.h"
#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;
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);
}
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);
}
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);
}
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);
}
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;
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);
}
#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);
}
*
*/
+#include "apr.h"
+#include "apr_strings.h"
+#include "apr_portable.h"
+#include "apr_file_io.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#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"
* University of Illinois, Urbana-Champaign.
*/
+#include "apr.h"
+#include "apr_lib.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#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.
*
*/
+#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 <stdio.h>
+#endif
+#if APR_HAVE_STDARG_H
+#include <stdarg.h>
+#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 <stdarg.h>
-#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
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);
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, */
* 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 <stdio.h>
+#endif
+
#define CORE_PRIVATE
#include "ap_config.h"
#include "httpd.h"
#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
* 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 <stdio.h> /* for perror() */
+#endif
+#if APR_HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#if APR_HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#define CORE_PRIVATE
+
+#include "ap_config.h"
#include "httpd.h"
#include "mpm_default.h"
#include "mpm_status.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
+
#include <signal.h>
#include <sys/times.h>
* 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 <sys/time.h> /* for timeval definitions */
-#endif
-#if HAVE_SYS_SOCKET_H
-#include <sys/socket.h> /* for setsockopt prototype */
-#endif
-
#ifdef MPM_NEEDS_RECLAIM_CHILD_PROCESSES
void ap_reclaim_child_processes(int terminate)
{
/* Rewritten by David Robinson */
+#include "apr.h"
+#include "apr_network_io.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h>
+#endif
+
#include "ap_config.h"
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#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 <string.h>
-#endif
/* Local stuff. */
/* Semi-well-known port */
#define CORE_PRIVATE
+#include "apr.h"
+#include "apr_strings.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* for EOF */
+#endif
+#if APR_HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if APR_HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#include "ap_config.h"
#include "ap_base64.h"
-#include "apr_strings.h"
#include "httpd.h"
#include "http_main.h"
#include "http_log.h"
#include "http_config.h"
#include "util_ebcdic.h"
-#ifdef HAVE_STDIO_H
-#include <stdio.h>
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
/* James Clark's Expat parser */
#include "xmlparse.h"
+#include "apr.h"
+#include "apr_strings.h"
+
+#if APR_HAVE_STDIO_H
+#include <stdio.h> /* 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"
/* 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 <stdio.h> /* for EOF */
+#endif
+
#include "ap_base64.h"
#ifdef NOT_ASCII
#include "apr_xlate.h"
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("<p>\n");
- printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.36 $");
+ printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.37 $");
printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
printf("</p>\n<p>\n");
* 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 <stdio.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
* 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 <stdio.h>
+#endif
+
#include "ap_config.h"
#include "apr_md5.h"
#include "ap_sha1.h"