From e3ba5f0aaa74f983a1518c8b0149c93f5dfa3cf5 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 29 Jun 2006 18:54:54 +0200 Subject: [PATCH] [CLEANUP] included common/version.h everywhere --- include/common/appsession.h | 1 + include/common/base64.h | 2 ++ include/common/cfgparse.h | 2 ++ include/common/chtbl.h | 3 ++- include/common/compat.h | 1 + include/common/config.h | 9 +++++++++ include/common/defaults.h | 9 --------- include/common/epoll.h | 4 +++- include/common/hashpjw.h | 2 ++ include/common/list.h | 1 + include/common/mini-clist.h | 2 ++ include/common/regex.h | 2 +- include/common/standard.h | 4 +--- include/common/template.h | 1 + include/common/time.h | 1 + include/common/uri_auth.h | 3 +++ include/common/version.h | 14 ++++++++++---- include/proto/backend.h | 1 + include/proto/buffers.h | 2 +- include/proto/checks.h | 1 + include/proto/client.h | 2 +- include/proto/fd.h | 1 + include/proto/log.h | 1 + include/proto/polling.h | 1 + include/proto/proto_http.h | 1 + include/proto/proxy.h | 2 +- include/proto/queue.h | 1 + include/proto/server.h | 1 + include/proto/session.h | 2 +- include/proto/stream_sock.h | 1 - include/proto/task.h | 4 +++- include/proto/template.h | 2 +- include/types/backend.h | 2 ++ include/types/buffers.h | 2 +- include/types/capture.h | 2 ++ include/types/client.h | 2 ++ include/types/fd.h | 2 +- include/types/global.h | 1 + include/types/httperr.h | 2 ++ include/types/log.h | 1 + include/types/proto_http.h | 1 + include/types/proxy.h | 1 + include/types/queue.h | 1 + include/types/server.h | 1 + include/types/session.h | 1 + include/types/task.h | 2 +- include/types/template.h | 1 + src/appsession.c | 1 + src/backend.c | 1 + src/base64.c | 1 + src/buffers.c | 2 ++ src/capture.c | 2 ++ src/chtbl.c | 1 + src/client.c | 1 + src/hashpjw.c | 1 + src/list.c | 1 + src/log.c | 1 + src/proxy.c | 1 + src/queue.c | 1 + src/regex.c | 1 + src/server.c | 1 + src/session.c | 2 ++ src/standard.c | 1 + src/stream_sock.c | 1 + src/time.c | 2 ++ src/uri_auth.c | 1 + 66 files changed, 100 insertions(+), 29 deletions(-) diff --git a/include/common/appsession.h b/include/common/appsession.h index 2c39e4663..eb9ba2d0f 100644 --- a/include/common/appsession.h +++ b/include/common/appsession.h @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/include/common/base64.h b/include/common/base64.h index 3948962d6..bd77c687a 100644 --- a/include/common/base64.h +++ b/include/common/base64.h @@ -14,6 +14,8 @@ #ifndef _COMMON_BASE64_H #define _COMMON_BASE64_H +#include + int a2base64(char *in, int ilen, char *out, int olen); extern const char base64tab[]; diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h index 35302b3b7..591f17239 100644 --- a/include/common/cfgparse.h +++ b/include/common/cfgparse.h @@ -22,6 +22,8 @@ #ifndef _COMMON_CFGPARSE_H #define _COMMON_CFGPARSE_H +#include + /* configuration sections */ #define CFG_NONE 0 #define CFG_GLOBAL 1 diff --git a/include/common/chtbl.h b/include/common/chtbl.h index 38b495fb8..cddb20796 100644 --- a/include/common/chtbl.h +++ b/include/common/chtbl.h @@ -20,7 +20,8 @@ #include -#include "list.h" +#include +#include /***************************************************************************** * * diff --git a/include/common/compat.h b/include/common/compat.h index a605da1ec..58908d79a 100644 --- a/include/common/compat.h +++ b/include/common/compat.h @@ -24,6 +24,7 @@ /* This is needed on Linux for Netfilter includes */ #include +#include /* INTBITS * how many bits are needed to code the size of an int on the target platform. diff --git a/include/common/config.h b/include/common/config.h index f9145c50a..c1cf098b8 100644 --- a/include/common/config.h +++ b/include/common/config.h @@ -31,4 +31,13 @@ */ #define SCHEDULER_RESOLUTION 9 +/* CONFIG_HAP_MEM_OPTIM + * This enables use of memory pools instead of malloc()/free(). There + * is no reason to disable it, except perhaps for rare debugging. + */ +#ifndef CONFIG_HAP_NO_MEM_OPTIM +# define CONFIG_HAP_MEM_OPTIM +#endif /* CONFIG_HAP_NO_MEM_OPTIM */ + + #endif /* _COMMON_CONFIG_H */ diff --git a/include/common/defaults.h b/include/common/defaults.h index 449fc5f17..e44a64c2e 100644 --- a/include/common/defaults.h +++ b/include/common/defaults.h @@ -22,15 +22,6 @@ #ifndef _COMMON_DEFAULTS_H #define _COMMON_DEFAULTS_H - -/* CONFIG_HAP_MEM_OPTIM - * This enables use of memory pools instead of malloc()/free(). There - * is no reason to disable it, except perhaps for rare debugging. - */ -#ifndef CONFIG_HAP_NO_MEM_OPTIM -# define CONFIG_HAP_MEM_OPTIM -#endif /* CONFIG_HAP_NO_MEM_OPTIM */ - /* * BUFSIZE defines the size of a read and write buffer. It is the maximum * amount of bytes which can be stored by the proxy for each session. However, diff --git a/include/common/epoll.h b/include/common/epoll.h index 865a3e129..56eef7ec6 100644 --- a/include/common/epoll.h +++ b/include/common/epoll.h @@ -29,8 +29,10 @@ #ifndef _COMMON_EPOLL_H #define _COMMON_EPOLL_H -#include #include +#include + +#include /* epoll_ctl() commands */ #ifndef EPOLL_CTL_ADD diff --git a/include/common/hashpjw.h b/include/common/hashpjw.h index 99a3ad7bc..8d3998c6a 100644 --- a/include/common/hashpjw.h +++ b/include/common/hashpjw.h @@ -19,6 +19,8 @@ #ifndef _COMMON_HASHPJW_H #define _COMMON_HASHPJW_H +#include + /***************************************************************************** * * * Define a table size for demonstration purposes only. * diff --git a/include/common/list.h b/include/common/list.h index 4537d8d98..91a5084dd 100644 --- a/include/common/list.h +++ b/include/common/list.h @@ -19,6 +19,7 @@ #define _COMMON_LIST_H #include +#include /***************************************************************************** * * diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index 47b004d7a..cf472ba8f 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -7,6 +7,8 @@ #ifndef _COMMON_MINI_CLIST_H #define _COMMON_MINI_CLIST_H +#include + /* these are circular or bidirectionnal lists only. Each list pointer points to * another list pointer in a structure, and not the structure itself. The * pointer to the next element MUST be the first one so that the list is easily diff --git a/include/common/regex.h b/include/common/regex.h index d9510bfba..c7f1c214a 100644 --- a/include/common/regex.h +++ b/include/common/regex.h @@ -22,7 +22,7 @@ #ifndef _COMMON_REGEX_H #define _COMMON_REGEX_H -#include +#include #ifdef USE_PCRE #include diff --git a/include/common/standard.h b/include/common/standard.h index bde42e316..0b2ea8d8a 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -23,9 +23,7 @@ #define _COMMON_STANDARD_H #include -#include -#include - +#include /****** string-specific macros and functions ******/ /* if a > max, then bound to . The macro returns the new */ diff --git a/include/common/template.h b/include/common/template.h index 431274fac..c9e48bfa1 100644 --- a/include/common/template.h +++ b/include/common/template.h @@ -22,6 +22,7 @@ #ifndef _COMMON_TEMPLATE_H #define _COMMON_TEMPLATE_H +#include #endif /* _COMMON_TEMPLATE_H */ diff --git a/include/common/time.h b/include/common/time.h index b25846662..7661aac03 100644 --- a/include/common/time.h +++ b/include/common/time.h @@ -24,6 +24,7 @@ #include #include +#include #define TIME_ETERNITY -1 diff --git a/include/common/uri_auth.h b/include/common/uri_auth.h index ddfa56ba6..bb25ac1ea 100644 --- a/include/common/uri_auth.h +++ b/include/common/uri_auth.h @@ -12,6 +12,9 @@ #ifndef _COMMON_URI_AUTH_H #define _COMMON_URI_AUTH_H + +#include + /* here we find a very basic list of base64-encoded 'user:passwd' strings */ struct user_auth { struct user_auth *next; /* next entry, NULL if none */ diff --git a/include/common/version.h b/include/common/version.h index c1ae43b23..14d68a2d4 100644 --- a/include/common/version.h +++ b/include/common/version.h @@ -22,17 +22,23 @@ #ifndef _COMMON_VERSION_H #define _COMMON_VERSION_H +#include + #ifdef CONFIG_PRODUCT_NAME -#define PRODUCT_NAME CONFIG_PRODUCT_NAME +#define PRODUCT_NAME CONFIG_PRODUCT_NAME #else -#define PRODUCT_NAME "HAProxy" +#define PRODUCT_NAME "HAProxy" #endif -#ifndef HAPROXY_VERSION +#ifdef CONFIG_HAPROXY_VERSION +#define HAPROXY_VERSION CONFIG_HAPROXY_VERSION +#else #define HAPROXY_VERSION "1.3.0" #endif -#ifndef HAPROXY_DATE +#ifdef CONFIG_HAPROXY_DATE +#define HAPROXY_DATE CONFIG_HAPROXY_DATE +#else #define HAPROXY_DATE "2006/06/26" #endif diff --git a/include/proto/backend.h b/include/proto/backend.h index 5f24be6d8..cc25a6fe1 100644 --- a/include/proto/backend.h +++ b/include/proto/backend.h @@ -22,6 +22,7 @@ #ifndef _PROTO_BACKEND_H #define _PROTO_BACKEND_H +#include #include #include diff --git a/include/proto/buffers.h b/include/proto/buffers.h index b332a4bcf..29a2abc8b 100644 --- a/include/proto/buffers.h +++ b/include/proto/buffers.h @@ -22,7 +22,7 @@ #ifndef _PROTO_BUFFERS_H #define _PROTO_BUFFERS_H -#include +#include #include /* returns 1 if the buffer is empty, 0 otherwise */ diff --git a/include/proto/checks.h b/include/proto/checks.h index d16a288bd..6ac32a1c9 100644 --- a/include/proto/checks.h +++ b/include/proto/checks.h @@ -23,6 +23,7 @@ #define _PROTO_CHECKS_H #include +#include int process_chk(struct task *t); diff --git a/include/proto/client.h b/include/proto/client.h index e119dca6b..3065b616d 100644 --- a/include/proto/client.h +++ b/include/proto/client.h @@ -22,9 +22,9 @@ #ifndef _PROTO_CLIENT_H #define _PROTO_CLIENT_H +#include #include - int event_accept(int fd); diff --git a/include/proto/fd.h b/include/proto/fd.h index 699047bdb..879205b78 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -26,6 +26,7 @@ #include #include +#include #include /* Deletes an FD from the fdsets, and recomputes the maxfd limit. diff --git a/include/proto/log.h b/include/proto/log.h index 5cc568a5f..7a74c8233 100644 --- a/include/proto/log.h +++ b/include/proto/log.h @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/include/proto/polling.h b/include/proto/polling.h index 6b349c609..179c654a2 100644 --- a/include/proto/polling.h +++ b/include/proto/polling.h @@ -22,6 +22,7 @@ #ifndef _PROTO_POLLING_H #define _PROTO_POLLING_H +#include #include /* diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h index e9cd4f3ea..205b0eebb 100644 --- a/include/proto/proto_http.h +++ b/include/proto/proto_http.h @@ -22,6 +22,7 @@ #ifndef _PROTO_PROTO_HTTP_H #define _PROTO_PROTO_HTTP_H +#include #include #include #include diff --git a/include/proto/proxy.h b/include/proto/proxy.h index 4a3d67c7d..968495f3a 100644 --- a/include/proto/proxy.h +++ b/include/proto/proxy.h @@ -22,7 +22,7 @@ #ifndef _PROTO_PROXY_H #define _PROTO_PROXY_H - +#include #include int start_proxies(int verbose); diff --git a/include/proto/queue.h b/include/proto/queue.h index 6909cbe0d..6732ba909 100644 --- a/include/proto/queue.h +++ b/include/proto/queue.h @@ -22,6 +22,7 @@ #ifndef _PROTO_QUEUE_H #define _PROTO_QUEUE_H +#include #include #include diff --git a/include/proto/server.h b/include/proto/server.h index b79b9702b..2df0763a2 100644 --- a/include/proto/server.h +++ b/include/proto/server.h @@ -24,6 +24,7 @@ #include +#include #include #include #include diff --git a/include/proto/session.h b/include/proto/session.h index 6c84f4c23..e3e523409 100644 --- a/include/proto/session.h +++ b/include/proto/session.h @@ -22,7 +22,7 @@ #ifndef _PROTO_SESSION_H #define _PROTO_SESSION_H - +#include #include void session_free(struct session *s); diff --git a/include/proto/stream_sock.h b/include/proto/stream_sock.h index 14d90cf81..31184b1ba 100644 --- a/include/proto/stream_sock.h +++ b/include/proto/stream_sock.h @@ -26,7 +26,6 @@ #include #include -#include #include diff --git a/include/proto/task.h b/include/proto/task.h index 72fd1f185..70abb8296 100644 --- a/include/proto/task.h +++ b/include/proto/task.h @@ -24,8 +24,10 @@ #include -#include + +#include #include +#include /* puts the task in run queue , and returns */ diff --git a/include/proto/template.h b/include/proto/template.h index 868634f78..f7f9e553e 100644 --- a/include/proto/template.h +++ b/include/proto/template.h @@ -22,7 +22,7 @@ #ifndef _PROTO_TEMPLATE_H #define _PROTO_TEMPLATE_H - +#include #include diff --git a/include/types/backend.h b/include/types/backend.h index 7a6a640ad..9fa179f7f 100644 --- a/include/types/backend.h +++ b/include/types/backend.h @@ -22,6 +22,8 @@ #ifndef _TYPES_BACKEND_H #define _TYPES_BACKEND_H +#include + /* bits for proxy->options */ #define PR_O_REDISP 0x00000001 /* allow reconnection to dispatch in case of errors */ #define PR_O_TRANSP 0x00000002 /* transparent mode : use original DEST as dispatch */ diff --git a/include/types/buffers.h b/include/types/buffers.h index 1bbea6905..b5bd661cb 100644 --- a/include/types/buffers.h +++ b/include/types/buffers.h @@ -22,7 +22,7 @@ #ifndef _TYPES_BUFFERS_H #define _TYPES_BUFFERS_H -#include +#include #include /* describes a chunk of string */ diff --git a/include/types/capture.h b/include/types/capture.h index e531b546d..d0271a2e2 100644 --- a/include/types/capture.h +++ b/include/types/capture.h @@ -22,6 +22,8 @@ #ifndef _TYPES_CAPTURE_H #define _TYPES_CAPTURE_H +#include + struct cap_hdr { struct cap_hdr *next; char *name; /* header name, case insensitive */ diff --git a/include/types/client.h b/include/types/client.h index d19e10065..24f405f20 100644 --- a/include/types/client.h +++ b/include/types/client.h @@ -22,6 +22,8 @@ #ifndef _TYPES_CLIENT_H #define _TYPES_CLIENT_H +#include + /* * FIXME: break this into HTTP state and TCP socket state. * See server.h for the other end. diff --git a/include/types/fd.h b/include/types/fd.h index 1b24be3f5..d0219dc6f 100644 --- a/include/types/fd.h +++ b/include/types/fd.h @@ -1,5 +1,5 @@ /* - include/fd.h + include/types/fd.h File descriptors states. Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu diff --git a/include/types/global.h b/include/types/global.h index 4a2e895e8..681ac0582 100644 --- a/include/types/global.h +++ b/include/types/global.h @@ -24,6 +24,7 @@ #include +#include #include /* modes of operation (global.mode) */ diff --git a/include/types/httperr.h b/include/types/httperr.h index 3a40a239f..c59404820 100644 --- a/include/types/httperr.h +++ b/include/types/httperr.h @@ -22,6 +22,8 @@ #ifndef _TYPES_HTTPERR_H #define _TYPES_HTTPERR_H +#include + /* various data sources for the responses */ #define DATA_SRC_NONE 0 #define DATA_SRC_STATS 1 diff --git a/include/types/log.h b/include/types/log.h index 9aeb11e7f..dc04e6580 100644 --- a/include/types/log.h +++ b/include/types/log.h @@ -22,6 +22,7 @@ #ifndef _TYPES_LOG_H #define _TYPES_LOG_H +#include #define MAX_SYSLOG_LEN 1024 #define NB_LOG_FACILITIES 24 diff --git a/include/types/proto_http.h b/include/types/proto_http.h index 2ccee0651..3cedc1e31 100644 --- a/include/types/proto_http.h +++ b/include/types/proto_http.h @@ -22,6 +22,7 @@ #ifndef _TYPES_PROTO_HTTP_H #define _TYPES_PROTO_HTTP_H +#include /* * FIXME: break this into HTTP state and TCP socket state. diff --git a/include/types/proxy.h b/include/types/proxy.h index d699bc104..306c31dcb 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/include/types/queue.h b/include/types/queue.h index 1e45b28a4..a8e7d8b01 100644 --- a/include/types/queue.h +++ b/include/types/queue.h @@ -22,6 +22,7 @@ #ifndef _TYPES_QUEUE_H #define _TYPES_QUEUE_H +#include #include #include diff --git a/include/types/server.h b/include/types/server.h index 7c62a3da0..37b8af15f 100644 --- a/include/types/server.h +++ b/include/types/server.h @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/include/types/session.h b/include/types/session.h index 8a5d0a450..477c4252d 100644 --- a/include/types/session.h +++ b/include/types/session.h @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/include/types/task.h b/include/types/task.h index 560a2fc68..6b1df226c 100644 --- a/include/types/task.h +++ b/include/types/task.h @@ -22,9 +22,9 @@ #ifndef _TYPES_TASK_H #define _TYPES_TASK_H - #include +#include /* values for task->state */ #define TASK_IDLE 0 diff --git a/include/types/template.h b/include/types/template.h index 8fa1ce52e..e4292e72b 100644 --- a/include/types/template.h +++ b/include/types/template.h @@ -22,6 +22,7 @@ #ifndef _TYPES_TEMPLATE_H #define _TYPES_TEMPLATE_H +#include #endif /* _TYPES_TEMPLATE_H */ diff --git a/src/appsession.c b/src/appsession.c index 58145e1a5..a63116d9c 100644 --- a/src/appsession.c +++ b/src/appsession.c @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/src/backend.c b/src/backend.c index df920a022..ff91ee3d0 100644 --- a/src/backend.c +++ b/src/backend.c @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/src/base64.c b/src/base64.c index d730328d7..005c48684 100644 --- a/src/base64.c +++ b/src/base64.c @@ -11,6 +11,7 @@ */ #include +#include const char base64tab[64]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/src/buffers.c b/src/buffers.c index bbc1f2831..5e71b532c 100644 --- a/src/buffers.c +++ b/src/buffers.c @@ -11,6 +11,8 @@ */ #include + +#include #include void **pool_buffer = NULL; diff --git a/src/capture.c b/src/capture.c index 3a7c2c6b1..c0c4a75f5 100644 --- a/src/capture.c +++ b/src/capture.c @@ -11,6 +11,8 @@ */ #include + +#include #include void **pool_capture = NULL; diff --git a/src/chtbl.c b/src/chtbl.c index 7773d403e..08eebb819 100644 --- a/src/chtbl.c +++ b/src/chtbl.c @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/src/client.c b/src/client.c index 31da5941a..f4f02e3a6 100644 --- a/src/client.c +++ b/src/client.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/src/hashpjw.c b/src/hashpjw.c index 69fa1b919..17ef3a285 100644 --- a/src/hashpjw.c +++ b/src/hashpjw.c @@ -16,6 +16,7 @@ * * *****************************************************************************/ +#include #include #include diff --git a/src/list.c b/src/list.c index ae79a0cb9..f23686aa3 100644 --- a/src/list.c +++ b/src/list.c @@ -18,6 +18,7 @@ #include #include +#include #include /***************************************************************************** diff --git a/src/log.c b/src/log.c index 34cf52532..a9b0eff49 100644 --- a/src/log.c +++ b/src/log.c @@ -20,6 +20,7 @@ #include +#include #include #include diff --git a/src/proxy.c b/src/proxy.c index 19273db93..c869be2d7 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/src/queue.c b/src/queue.c index a12f31373..35285378f 100644 --- a/src/queue.c +++ b/src/queue.c @@ -10,6 +10,7 @@ * */ +#include #include #include diff --git a/src/regex.c b/src/regex.c index 9db3d1015..7d6b30ddc 100644 --- a/src/regex.c +++ b/src/regex.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/src/server.c b/src/server.c index 50c025d3f..5b33d114b 100644 --- a/src/server.c +++ b/src/server.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include diff --git a/src/session.c b/src/session.c index e057b1524..9a59e2858 100644 --- a/src/session.c +++ b/src/session.c @@ -11,6 +11,8 @@ */ #include + +#include #include #include diff --git a/src/standard.c b/src/standard.c index 7ddb88a81..64357a2b2 100644 --- a/src/standard.c +++ b/src/standard.c @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/src/stream_sock.c b/src/stream_sock.c index d8a99bff0..1c7fa5916 100644 --- a/src/stream_sock.c +++ b/src/stream_sock.c @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/src/time.c b/src/time.c index e573b9d9c..5abfcc4d2 100644 --- a/src/time.c +++ b/src/time.c @@ -11,6 +11,8 @@ */ #include + +#include #include struct timeval now; /* the current date at any moment */ diff --git a/src/uri_auth.c b/src/uri_auth.c index 661419a21..f666c0dfa 100644 --- a/src/uri_auth.c +++ b/src/uri_auth.c @@ -14,6 +14,7 @@ #include #include +#include #include