Cleaned many (not all) duplicate and hidden implicit #include directives from header and source files. Header files should generally not include other header files
This commit is contained in:
parent
cd9dd57c13
commit
a3d4939c5e
@ -35,13 +35,11 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <httperf.h>
|
||||
#include <object.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <httperf.h>
|
||||
|
||||
static u_long next_id = 0;
|
||||
|
||||
|
@ -34,13 +34,8 @@
|
||||
#ifndef call_h
|
||||
#define call_h
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <httperf.h>
|
||||
#include <conn.h>
|
||||
#include <object.h>
|
||||
|
||||
/* Max. # of additional request header lines we allow: */
|
||||
#define MAX_EXTRA_HEADERS 4
|
||||
|
||||
|
@ -37,9 +37,10 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <conn.h>
|
||||
|
||||
|
@ -38,10 +38,6 @@
|
||||
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <httperf.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
# include <openssl/ssl.h>
|
||||
# include <openssl/err.h>
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
@ -59,12 +58,15 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
#include <http.h>
|
||||
#include <conn.h>
|
||||
|
||||
|
||||
/*if we don't have GNU compatible realloc, fake it*/
|
||||
#if HAVE_REALLOC == 0
|
||||
|
@ -36,9 +36,6 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
|
||||
extern void core_init (void);
|
||||
extern struct sockaddr_in *core_intern_addr (const char *hostname,
|
||||
size_t hostname_len, int port);
|
||||
|
@ -39,11 +39,13 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
#include <conn.h>
|
||||
|
||||
#define CONN_PRIVATE_DATA(c) \
|
||||
((Conn_Private_Data *) ((char *)(c) + conn_private_data_offset))
|
||||
|
@ -41,12 +41,14 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
#include <rate.h>
|
||||
#include <conn.h>
|
||||
#include <timer.h>
|
||||
#include <call.h>
|
||||
#include <core.h>
|
||||
|
||||
static int num_conns_generated;
|
||||
static int num_conns_destroyed;
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <localevent.h>
|
||||
|
@ -39,9 +39,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <localevent.h>
|
||||
#include <object.h>
|
||||
#include <rate.h>
|
||||
#include <timer.h>
|
||||
|
||||
|
@ -50,6 +50,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
|
@ -68,6 +68,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <localevent.h>
|
||||
|
@ -78,8 +78,11 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <localevent.h>
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
@ -51,7 +53,6 @@
|
||||
#include <localevent.h>
|
||||
#include <rate.h>
|
||||
#include <session.h>
|
||||
#include <timer.h>
|
||||
|
||||
#define SESS_PRIVATE_DATA(c) \
|
||||
((Sess_Private_Data *) ((char *)(c) + sess_private_data_offset))
|
||||
|
@ -83,13 +83,15 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <conn.h>
|
||||
#include <call.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
#include <rate.h>
|
||||
#include <session.h>
|
||||
#include <timer.h>
|
||||
|
||||
/* Maximum number of sessions that can be defined in the configuration
|
||||
file. */
|
||||
|
@ -49,6 +49,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
@ -56,7 +58,6 @@
|
||||
#include <localevent.h>
|
||||
#include <rate.h>
|
||||
#include <session.h>
|
||||
#include <timer.h>
|
||||
|
||||
#define CALL_PRIVATE_DATA(c) \
|
||||
((Call_Private_Data *) ((char *)(c) + call_private_data_offset))
|
||||
|
@ -42,11 +42,13 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <localevent.h>
|
||||
#include <httperf.h>
|
||||
#include <http.h>
|
||||
#include <call.h>
|
||||
#include <localevent.h>
|
||||
#include <conn.h>
|
||||
|
||||
/* Read a CRLF terminated line of characters into c->reply.line.
|
||||
Returns 1 when the line is complete, 0 when the line is incomplete
|
||||
|
@ -35,11 +35,6 @@
|
||||
#ifndef http_h
|
||||
#define http_h
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
|
||||
extern void http_process_reply_bytes (Call *c, char **buf, size_t *buf_len);
|
||||
|
||||
#endif /* http_h */
|
||||
|
@ -73,11 +73,14 @@
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <conn.h>
|
||||
#include <call.h>
|
||||
#include <core.h>
|
||||
#include <localevent.h>
|
||||
#include <httperf.h>
|
||||
#include <conn.h>
|
||||
#include <timer.h>
|
||||
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
# include <openssl/rand.h>
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <localevent.h>
|
||||
|
||||
|
@ -35,9 +35,6 @@
|
||||
#ifndef localevent_h
|
||||
#define localevent_h
|
||||
|
||||
#include <httperf.h>
|
||||
#include <object.h>
|
||||
|
||||
typedef enum Event_Type
|
||||
{
|
||||
EV_PERF_SAMPLE,
|
||||
|
@ -41,11 +41,12 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <localevent.h>
|
||||
#include <object.h>
|
||||
#include <sess.h>
|
||||
|
||||
#define ALIGN(s) (((s) + sizeof (double) - 1) & ~(sizeof (double) - 1))
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <httperf.h>
|
||||
#include <localevent.h>
|
||||
#include <sess.h>
|
||||
|
@ -43,8 +43,11 @@
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <localevent.h>
|
||||
#include <stats.h>
|
||||
|
||||
|
@ -43,6 +43,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
|
@ -43,8 +43,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <object.h>
|
||||
#include <timer.h>
|
||||
#include <httperf.h>
|
||||
#include <call.h>
|
||||
#include <conn.h>
|
||||
#include <localevent.h>
|
||||
#include <session.h>
|
||||
#include <stats.h>
|
||||
|
@ -36,9 +36,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <generic_types.h>
|
||||
#include <httperf.h>
|
||||
@ -51,11 +48,13 @@ static Time next_tick;
|
||||
static Timer *timer_free_list = 0;
|
||||
static Timer *t_curr = 0;
|
||||
|
||||
static struct Timer_List {
|
||||
typedef struct Timer_List {
|
||||
struct Timer_List *next;
|
||||
struct Timer *this_timer;
|
||||
|
||||
} *timer_list_head = NULL;
|
||||
} Timer_List;
|
||||
|
||||
static Timer_List *timer_list_head = NULL;
|
||||
|
||||
/*
|
||||
* What a wheel is made of, no?
|
||||
|
Loading…
Reference in New Issue
Block a user