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:
tedbullock 2007-07-16 00:59:58 +00:00
parent cd9dd57c13
commit a3d4939c5e
29 changed files with 59 additions and 45 deletions

View File

@ -35,13 +35,11 @@
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <httperf.h> #include <object.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <httperf.h>
static u_long next_id = 0; static u_long next_id = 0;

View File

@ -34,13 +34,8 @@
#ifndef call_h #ifndef call_h
#define call_h #define call_h
#include <sys/types.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <httperf.h>
#include <conn.h>
#include <object.h>
/* Max. # of additional request header lines we allow: */ /* Max. # of additional request header lines we allow: */
#define MAX_EXTRA_HEADERS 4 #define MAX_EXTRA_HEADERS 4

View File

@ -37,9 +37,10 @@
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <conn.h> #include <conn.h>

View File

@ -38,10 +38,6 @@
#include <sys/uio.h> #include <sys/uio.h>
#include <httperf.h>
#include <object.h>
#include <timer.h>
#ifdef HAVE_SSL #ifdef HAVE_SSL
# include <openssl/ssl.h> # include <openssl/ssl.h>
# include <openssl/err.h> # include <openssl/err.h>

View File

@ -42,7 +42,6 @@
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -59,12 +58,15 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h>
#include <core.h> #include <core.h>
#include <localevent.h> #include <localevent.h>
#include <http.h> #include <http.h>
#include <conn.h>
/*if we don't have GNU compatible realloc, fake it*/ /*if we don't have GNU compatible realloc, fake it*/
#if HAVE_REALLOC == 0 #if HAVE_REALLOC == 0

View File

@ -36,9 +36,6 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <call.h>
#include <conn.h>
extern void core_init (void); extern void core_init (void);
extern struct sockaddr_in *core_intern_addr (const char *hostname, extern struct sockaddr_in *core_intern_addr (const char *hostname,
size_t hostname_len, int port); size_t hostname_len, int port);

View File

@ -39,11 +39,13 @@
#include <assert.h> #include <assert.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h>
#include <core.h> #include <core.h>
#include <localevent.h> #include <localevent.h>
#include <conn.h>
#define CONN_PRIVATE_DATA(c) \ #define CONN_PRIVATE_DATA(c) \
((Conn_Private_Data *) ((char *)(c) + conn_private_data_offset)) ((Conn_Private_Data *) ((char *)(c) + conn_private_data_offset))

View File

@ -41,12 +41,14 @@
#include <stdio.h> #include <stdio.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <core.h>
#include <localevent.h> #include <localevent.h>
#include <rate.h> #include <rate.h>
#include <conn.h> #include <conn.h>
#include <timer.h> #include <call.h>
#include <core.h>
static int num_conns_generated; static int num_conns_generated;
static int num_conns_destroyed; static int num_conns_destroyed;

View File

@ -51,6 +51,7 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <localevent.h> #include <localevent.h>

View File

@ -39,9 +39,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <localevent.h> #include <localevent.h>
#include <object.h>
#include <rate.h> #include <rate.h>
#include <timer.h> #include <timer.h>

View File

@ -50,6 +50,8 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>

View File

@ -68,6 +68,8 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>

View File

@ -42,6 +42,7 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <localevent.h> #include <localevent.h>

View File

@ -78,8 +78,11 @@
#include <unistd.h> #include <unistd.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h>
#include <core.h> #include <core.h>
#include <localevent.h> #include <localevent.h>

View File

@ -43,6 +43,7 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <localevent.h> #include <localevent.h>

View File

@ -44,6 +44,8 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>
@ -51,7 +53,6 @@
#include <localevent.h> #include <localevent.h>
#include <rate.h> #include <rate.h>
#include <session.h> #include <session.h>
#include <timer.h>
#define SESS_PRIVATE_DATA(c) \ #define SESS_PRIVATE_DATA(c) \
((Sess_Private_Data *) ((char *)(c) + sess_private_data_offset)) ((Sess_Private_Data *) ((char *)(c) + sess_private_data_offset))

View File

@ -83,13 +83,15 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <conn.h> #include <conn.h>
#include <call.h>
#include <core.h> #include <core.h>
#include <localevent.h> #include <localevent.h>
#include <rate.h> #include <rate.h>
#include <session.h> #include <session.h>
#include <timer.h>
/* Maximum number of sessions that can be defined in the configuration /* Maximum number of sessions that can be defined in the configuration
file. */ file. */

View File

@ -49,6 +49,8 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>
@ -56,7 +58,6 @@
#include <localevent.h> #include <localevent.h>
#include <rate.h> #include <rate.h>
#include <session.h> #include <session.h>
#include <timer.h>
#define CALL_PRIVATE_DATA(c) \ #define CALL_PRIVATE_DATA(c) \
((Call_Private_Data *) ((char *)(c) + call_private_data_offset)) ((Call_Private_Data *) ((char *)(c) + call_private_data_offset))

View File

@ -42,11 +42,13 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <call.h>
#include <conn.h>
#include <localevent.h>
#include <httperf.h> #include <httperf.h>
#include <http.h> #include <http.h>
#include <call.h>
#include <localevent.h>
#include <conn.h>
/* Read a CRLF terminated line of characters into c->reply.line. /* Read a CRLF terminated line of characters into c->reply.line.
Returns 1 when the line is complete, 0 when the line is incomplete Returns 1 when the line is complete, 0 when the line is incomplete

View File

@ -35,11 +35,6 @@
#ifndef http_h #ifndef http_h
#define 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); extern void http_process_reply_bytes (Call *c, char **buf, size_t *buf_len);
#endif /* http_h */ #endif /* http_h */

View File

@ -73,11 +73,14 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <conn.h>
#include <call.h>
#include <core.h> #include <core.h>
#include <localevent.h> #include <localevent.h>
#include <httperf.h> #include <httperf.h>
#include <conn.h>
#include <timer.h>
#ifdef HAVE_SSL #ifdef HAVE_SSL
# include <openssl/rand.h> # include <openssl/rand.h>

View File

@ -38,6 +38,7 @@
#include <stdio.h> #include <stdio.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <localevent.h> #include <localevent.h>

View File

@ -35,9 +35,6 @@
#ifndef localevent_h #ifndef localevent_h
#define localevent_h #define localevent_h
#include <httperf.h>
#include <object.h>
typedef enum Event_Type typedef enum Event_Type
{ {
EV_PERF_SAMPLE, EV_PERF_SAMPLE,

View File

@ -41,11 +41,12 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>
#include <localevent.h> #include <localevent.h>
#include <object.h>
#include <sess.h> #include <sess.h>
#define ALIGN(s) (((s) + sizeof (double) - 1) & ~(sizeof (double) - 1)) #define ALIGN(s) (((s) + sizeof (double) - 1) & ~(sizeof (double) - 1))

View File

@ -35,6 +35,7 @@
#include "config.h" #include "config.h"
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <httperf.h> #include <httperf.h>
#include <localevent.h> #include <localevent.h>
#include <sess.h> #include <sess.h>

View File

@ -43,8 +43,11 @@
#include <sys/resource.h> #include <sys/resource.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h>
#include <localevent.h> #include <localevent.h>
#include <stats.h> #include <stats.h>

View File

@ -43,6 +43,8 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h> #include <conn.h>

View File

@ -43,8 +43,11 @@
#include <string.h> #include <string.h>
#include <generic_types.h> #include <generic_types.h>
#include <object.h>
#include <timer.h>
#include <httperf.h> #include <httperf.h>
#include <call.h> #include <call.h>
#include <conn.h>
#include <localevent.h> #include <localevent.h>
#include <session.h> #include <session.h>
#include <stats.h> #include <stats.h>

View File

@ -36,9 +36,6 @@
#include <errno.h> #include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <generic_types.h> #include <generic_types.h>
#include <httperf.h> #include <httperf.h>
@ -51,11 +48,13 @@ static Time next_tick;
static Timer *timer_free_list = 0; static Timer *timer_free_list = 0;
static Timer *t_curr = 0; static Timer *t_curr = 0;
static struct Timer_List { typedef struct Timer_List {
struct Timer_List *next; struct Timer_List *next;
struct Timer *this_timer; struct Timer *this_timer;
} *timer_list_head = NULL; } Timer_List;
static Timer_List *timer_list_head = NULL;
/* /*
* What a wheel is made of, no? * What a wheel is made of, no?