an extra stat() that's a waste.
*/
+#ifdef HAVE_STDIOP_H
#include <stdio.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+/* What are these here for? rbb */
#include <fcntl.h>
#include <errno.h>
-#include <string.h>
#define CORE_PRIVATE
* !!!This is an extremely cheap ripoff of mod_charset.c from Russian Apache!!!
*/
-#include <errno.h>
+#ifdef HAVE_STDIO_H
#include <stdio.h>
+#endif
#include "httpd.h"
#include "http_config.h"
#include "http_main.h"
#include "util_script.h"
#include "http_core.h"
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#include "iol_socket.h"
#include "unixd.h"
#include <sys/stat.h>
-#include <sys/socket.h> /* for sockaddr_un */
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include <sys/un.h> /* for sockaddr_un */
#include <sys/types.h>
-#include <sys/stat.h>
module MODULE_VAR_EXPORT cgid_module;
#include "http_connection.h"
#include "util_ebcdic.h"
#include "mpm.h"
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
/* Allow Apache to use ap_mmap */
#ifdef USE_MMAP_FILES
#include "util_date.h" /* For parseHTTPdate and BAD_DATE */
#include "util_charset.h"
#include "mpm_status.h"
+#ifdef HAVE_STDARG_H
#include <stdarg.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
AP_HOOK_STRUCT(
AP_HOOK_LINK(post_read_request)
#include "http_core.h" /* For REMOTE_NAME */
#include "http_log.h"
#include "http_protocol.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
/* Include from the underlaying Unix system ... */
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_STDARG_H
#include <stdarg.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef HAVE_TIME_H
#include <time.h>
-#include <signal.h>
-#include <errno.h>
+#endif
+#ifdef HAVE_CTYPE_H
#include <ctype.h>
+#endif
#ifndef NETWARE
#include <sys/types.h>
#endif
+/* are these needed anymore? rbb */
+#include <signal.h>
+#include <errno.h>
/* Include from the Apache server ... */
#define CORE_PRIVATE
#include "http_log.h"
#include "http_protocol.h"
#include "util_script.h"
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef HAVE_UTIME_H
#include <utime.h>
#endif
#include "http_log.h"
#include "http_protocol.h" /* for ap_hook_post_read_request */
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
typedef struct {
unsigned int stamp;
* INLINE will _not_ be set so we can use this to test if we are
* compiling this source file.
*/
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifndef INLINE
#define INLINE
#include "http_main.h"
#include "http_log.h"
#include "unixd.h"
+#ifdef HAVE_PWD_H
#include <pwd.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
-#include <sys/resource.h>
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef HAVE_GRP_H
#include <grp.h>
+#endif
unixd_config_rec unixd_config;
#define UNIXD_H
#include "httpd.h"
+#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
+#endif
/* common stuff that unix MPMs will want */
#include "http_config.h"
#include "http_vhost.h"
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
AP_HOOK_STRUCT(
AP_HOOK_LINK(pre_connection)
#include "http_config.h"
#include "ap_listen.h"
#include "http_log.h"
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
ap_listen_rec *ap_listeners;
static ap_listen_rec *old_listeners;
#include "http_log.h"
#include "http_main.h"
+#ifdef HAVE_STDARG_H
#include <stdarg.h>
+#endif
typedef struct {
char *t_name;
#include "mpm.h"
#include "scoreboard.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <poll.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#include "mpm_status.h"
#include "scoreboard.h"
#include "mpm.h" /* for ap_max_daemons_limit */
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
static scoreboard *ap_scoreboard_image = NULL;
API_VAR_EXPORT char *ap_scoreboard_fname;
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
-#include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#include <pthread.h>
#include <signal.h>
#include "mpm_status.h"
#include "mpm.h"
#include "scoreboard.h"
+#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif
scoreboard *ap_scoreboard_image = NULL;
new_scoreboard *ap_new_scoreboard_image = NULL;
#include "iol_socket.h"
#include "ap_listen.h"
#include "ap_mmn.h"
-#include <sys/times.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_NETINET_TCP_H
#include <netinet/tcp.h> /* for TCP_NODELAY */
#endif
#include <bstring.h> /* for IRIX, FD_SET calls bzero() */
#endif
#include <signal.h>
+#include <sys/times.h>
/* config globals */
#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 */
#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_NETDB_H
#include <netdb.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#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
* is generated automatically by gen_test_char.c.
#include "ap_config.h"
#include "util_date.h"
+#ifdef HAVE_CTYPE_H
#include <ctype.h>
+#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
/*
* Compare a string to a mask
#include "util_script.h"
#include "util_date.h" /* For parseHTTPdate() */
#include "util_ebcdic.h"
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
#ifdef OS2
#define INCL_DOS
#include "httpd.h"
#include "http_log.h"
#include "util_uri.h"
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
/* Some WWW schemes and their default ports; this is basically /etc/services */
/* This will become global when the protocol abstraction comes */
#include "http_protocol.h"
#include "http_core.h"
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
/*
* After all the definitions there's an explanation of how it's all put
#ifdef NOT_ASCII
#include "apr_xlate.h"
#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_STDIO_H
#include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#ifdef HAVE_CTYPE_H
#include <ctype.h>
+#endif
/* ------------------- DEFINITIONS -------------------------- */
static void copyright(void)
{
if (!use_html) {
- printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.17 $> apache-2.0");
+ printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.18 $> 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.17 $");
+ printf(" This is ApacheBench, Version %s <i><%s></i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.18 $");
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");
*/
#include "ap_config.h"
-#include <ctype.h>
#include <stdio.h>
+#ifdef HAVE_CTYPE_H
+#include <ctype.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
#if !defined(MPE) && !defined(BEOS) && !defined(WIN32)
#include <arpa/inet.h>
#include "ap_config.h"
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <stdlib.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
#define BUFSIZE 65536