From: Willy Tarreau Date: Thu, 4 Jun 2020 20:01:04 +0000 (+0200) Subject: REORG: include: move log.h to haproxy/log{,-t}.h X-Git-Tag: v2.2-dev9~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeed4a85d6c95382f26ff34d9e944c71e21be711;p=thirdparty%2Fhaproxy.git REORG: include: move log.h to haproxy/log{,-t}.h The current state of the logging is a real mess. The main problem is that almost all files include log.h just in order to have access to the alert/warning functions like ha_alert() etc, and don't care about logs. But log.h also deals with real logging as well as log-format and depends on stream.h and various other things. As such it forces a few heavy files like stream.h to be loaded early and to hide missing dependencies depending where it's loaded. Among the missing ones is syslog.h which was often automatically included resulting in no less than 3 users missing it. Among 76 users, only 5 could be removed, and probably 70 don't need the full set of dependencies. A good approach would consist in splitting that file in 3 parts: - one for error output ("errors" ?). - one for log_format processing - and one for actual logging. --- diff --git a/contrib/modsecurity/modsec_wrapper.c b/contrib/modsecurity/modsec_wrapper.c index 9aec53888c..7407674547 100644 --- a/contrib/modsecurity/modsec_wrapper.c +++ b/contrib/modsecurity/modsec_wrapper.c @@ -18,12 +18,12 @@ #include #include +#include #include #include #include -#include #include #include diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h index 86f87bf42b..9dd6363232 100644 --- a/include/common/cfgparse.h +++ b/include/common/cfgparse.h @@ -24,8 +24,7 @@ #include #include - -#include +#include #include /* configuration sections */ diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index 0c0404313b..24cad0f80d 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h index e359a3ea24..ef393dcb37 100644 --- a/include/haproxy/defaults.h +++ b/include/haproxy/defaults.h @@ -74,6 +74,11 @@ #define MAX_SYSLOG_LEN 1024 #endif +/* 64kB to archive startup-logs seems way more than enough */ +#ifndef STARTUP_LOG_SIZE +#define STARTUP_LOG_SIZE 65536 +#endif + // maximum line size when parsing config #ifndef LINESIZE #define LINESIZE 2048 diff --git a/include/types/log.h b/include/haproxy/log-t.h similarity index 69% rename from include/types/log.h rename to include/haproxy/log-t.h index 28992db134..c3efa2c7de 100644 --- a/include/types/log.h +++ b/include/haproxy/log-t.h @@ -1,34 +1,36 @@ /* - include/types/log.h - This file contains definitions of log-related structures and macros. - - Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation, version 2.1 - exclusively. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ + * include/haproxy/log-t.h + * This file contains definitions of log-related structures and macros. + * + * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, version 2.1 + * exclusively. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ -#ifndef _TYPES_LOG_H -#define _TYPES_LOG_H +#ifndef _HAPROXY_LOG_T_H +#define _HAPROXY_LOG_T_H #include #include #include -#include -#include + #include #include +#include +#include + #define NB_LOG_FACILITIES 24 #define NB_LOG_LEVELS 8 @@ -36,13 +38,35 @@ #define SYSLOG_PORT 514 #define UNIQUEID_LEN 128 -/* 64kB to archive startup-logs seems way more than enough */ -#ifndef STARTUP_LOG_SIZE -#define STARTUP_LOG_SIZE 65536 -#endif +/* flags used in logformat_node->options */ +#define LOG_OPT_HEXA 0x00000001 +#define LOG_OPT_MANDATORY 0x00000002 +#define LOG_OPT_QUOTE 0x00000004 +#define LOG_OPT_REQ_CAP 0x00000008 +#define LOG_OPT_RES_CAP 0x00000010 +#define LOG_OPT_HTTP 0x00000020 +#define LOG_OPT_ESC 0x00000040 + + +/* Fields that need to be extracted from the incoming connection or request for + * logging or for sending specific header information. They're set in px->to_log + * and appear as flags in session->logs.logwait, which are removed once the + * required information has been collected. + */ +#define LW_INIT 1 /* anything */ +#define LW_CLIP 2 /* CLient IP */ +#define LW_SVIP 4 /* SerVer IP */ +#define LW_SVID 8 /* server ID */ +#define LW_REQ 16 /* http REQuest */ +#define LW_RESP 32 /* http RESPonse */ +#define LW_BYTES 256 /* bytes read from server */ +#define LW_COOKIE 512 /* captured cookie */ +#define LW_REQHDR 1024 /* request header(s) */ +#define LW_RSPHDR 2048 /* response header(s) */ +#define LW_BCKIP 4096 /* backend IP */ +#define LW_FRTIP 8192 /* frontend IP */ +#define LW_XPRT 16384 /* transport layer information (eg: SSL) */ -/* The array containing the names of the log levels. */ -extern const char *log_levels[]; /* enum for log format */ enum { @@ -60,7 +84,7 @@ enum log_tgt { LOG_TARGET_BUFFER, // ring buffer }; -/* lists of fields that can be logged */ +/* lists of fields that can be logged, for logformat_node->type */ enum { LOG_FMT_TEXT = 0, /* raw text */ @@ -156,34 +180,6 @@ struct logformat_node { void *expr; // for use with LOG_FMT_EXPR }; -#define LOG_OPT_HEXA 0x00000001 -#define LOG_OPT_MANDATORY 0x00000002 -#define LOG_OPT_QUOTE 0x00000004 -#define LOG_OPT_REQ_CAP 0x00000008 -#define LOG_OPT_RES_CAP 0x00000010 -#define LOG_OPT_HTTP 0x00000020 -#define LOG_OPT_ESC 0x00000040 - - -/* Fields that need to be extracted from the incoming connection or request for - * logging or for sending specific header information. They're set in px->to_log - * and appear as flags in session->logs.logwait, which are removed once the - * required information has been collected. - */ -#define LW_INIT 1 /* anything */ -#define LW_CLIP 2 /* CLient IP */ -#define LW_SVIP 4 /* SerVer IP */ -#define LW_SVID 8 /* server ID */ -#define LW_REQ 16 /* http REQuest */ -#define LW_RESP 32 /* http RESPonse */ -#define LW_BYTES 256 /* bytes read from server */ -#define LW_COOKIE 512 /* captured cookie */ -#define LW_REQHDR 1024 /* request header(s) */ -#define LW_RSPHDR 2048 /* response header(s) */ -#define LW_BCKIP 4096 /* backend IP */ -#define LW_FRTIP 8192 /* frontend IP */ -#define LW_XPRT 16384 /* transport layer information (eg: SSL) */ - /* Range of indexes for log sampling. */ struct smp_log_range { unsigned int low; /* Low limit of the indexes of this range. */ @@ -223,7 +219,7 @@ struct logsrv { __decl_thread(HA_SPINLOCK_T lock); }; -#endif /* _TYPES_LOG_H */ +#endif /* _HAPROXY_LOG_T_H */ /* * Local variables: diff --git a/include/proto/log.h b/include/haproxy/log.h similarity index 81% rename from include/proto/log.h rename to include/haproxy/log.h index 48802dc10c..caddd95b87 100644 --- a/include/proto/log.h +++ b/include/haproxy/log.h @@ -1,44 +1,40 @@ /* - include/proto/log.h - This file contains definitions of log-related functions, structures, - and macros. - - Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation, version 2.1 - exclusively. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef _PROTO_LOG_H -#define _PROTO_LOG_H - -#include + * include/haproxy/log.h + * This file contains definitions of log-related functions. + * + * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, version 2.1 + * exclusively. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _HAPROXY_LOG_H +#define _HAPROXY_LOG_H + #include #include -#include +#include +#include #include - -#include -#include -#include - #include +#include extern struct pool_head *pool_head_requri; extern struct pool_head *pool_head_uniqueid; +extern const char *log_levels[]; extern char *log_format; extern char default_tcp_log_format[]; extern char default_http_log_format[]; @@ -54,32 +50,13 @@ extern THREAD_LOCAL char *logline; extern THREAD_LOCAL char *logline_rfc5424; -/* - * Test if index numbered from 0 is in range with low and high - * limits of indexes numbered from 1. - */ -static inline int in_smp_log_range(struct smp_log_range *rg, unsigned int idx) -{ - if (idx + 1 <= rg->high && idx + 1 >= rg->low) - return 1; - return 0; -} - /* Initialize/Deinitialize log buffers used for syslog messages */ int init_log_buffers(); void deinit_log_buffers(); -/* - * Builds a log line. - */ +/* build a log line for the session and an optional stream */ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t maxsize, struct list *list_format); -static inline int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list_format) -{ - return sess_build_logline(strm_sess(s), s, dst, maxsize, list_format); -} - - /* * send a log for the stream when we have enough info about it. * Will not log if the frontend has no log defined. @@ -191,7 +168,26 @@ char *update_log_hdr(const time_t time); char * get_format_pid_sep1(int format, size_t *len); char * get_format_pid_sep2(int format, size_t *len); -#endif /* _PROTO_LOG_H */ +/* + * Test if index numbered from 0 is in range with low and high + * limits of indexes numbered from 1. + */ +static inline int in_smp_log_range(struct smp_log_range *rg, unsigned int idx) +{ + if (idx + 1 <= rg->high && idx + 1 >= rg->low) + return 1; + return 0; +} + +/* + * Builds a log line for the stream (must be valid). + */ +static inline int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list_format) +{ + return sess_build_logline(strm_sess(s), s, dst, maxsize, list_format); +} + +#endif /* _HAPROXY_LOG_H */ /* * Local variables: diff --git a/include/haproxy/trace.h b/include/haproxy/trace.h index 0367aa73ee..ae5a3c189b 100644 --- a/include/haproxy/trace.h +++ b/include/haproxy/trace.h @@ -29,7 +29,6 @@ #include #include #include -#include /* Make a string from the location of the trace producer as "file:line" */ #define TRC_LOC _TRC_LOC(__FILE__, __LINE__) diff --git a/include/proto/server.h b/include/proto/server.h index 4d78c1d279..34314236fc 100644 --- a/include/proto/server.h +++ b/include/proto/server.h @@ -27,13 +27,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include diff --git a/include/types/proxy.h b/include/types/proxy.h index b86df8d92d..6bcad167c0 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/include/types/spoe.h b/include/types/spoe.h index 1538a729a9..1f0a84aaf6 100644 --- a/include/types/spoe.h +++ b/include/types/spoe.h @@ -30,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/src/51d.c b/src/51d.c index 37124ea37f..12f40ea092 100644 --- a/src/51d.c +++ b/src/51d.c @@ -8,10 +8,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/src/acl.c b/src/acl.c index 275087de7e..f3332ac271 100644 --- a/src/acl.c +++ b/src/acl.c @@ -18,13 +18,13 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/action.c b/src/action.c index fa3b4f7774..999790356f 100644 --- a/src/action.c +++ b/src/action.c @@ -15,10 +15,10 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/src/auth.c b/src/auth.c index faac16d4e2..646c0109eb 100644 --- a/src/auth.c +++ b/src/auth.c @@ -29,11 +29,10 @@ #include #include #include +#include #include #include -#include - struct userlist *userlist = NULL; /* list of all existing userlists */ #ifdef USE_LIBCRYPT diff --git a/src/backend.c b/src/backend.c index f79ac18e54..423163f26a 100644 --- a/src/backend.c +++ b/src/backend.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -48,7 +49,6 @@ #include #include -#include #include #include #include diff --git a/src/cache.c b/src/cache.c index 17d015afa4..0858a8de8e 100644 --- a/src/cache.c +++ b/src/cache.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include -#include #include diff --git a/src/cfgparse.c b/src/cfgparse.c index 8bd60b7cbd..a15028b2e2 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,6 @@ #include #include -#include #include #include #include diff --git a/src/check.c b/src/check.c index 7381a324ff..6b4f9faecf 100644 --- a/src/check.c +++ b/src/check.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -58,14 +59,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include diff --git a/src/cli.c b/src/cli.c index 9e6b56ac35..e5413e9f00 100644 --- a/src/cli.c +++ b/src/cli.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -57,7 +58,6 @@ #include #include #include -#include #include #include #include diff --git a/src/da.c b/src/da.c index 1d62ade4a0..6090851abc 100644 --- a/src/da.c +++ b/src/da.c @@ -8,9 +8,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/src/debug.c b/src/debug.c index 4f7e6cea74..6829eb2862 100644 --- a/src/debug.c +++ b/src/debug.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/dns.c b/src/dns.c index 7658f6f846..bcbc435aef 100644 --- a/src/dns.c +++ b/src/dns.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,6 @@ #include #include -#include #include #include #include diff --git a/src/ev_evports.c b/src/ev_evports.c index 3d60247125..81cbe5138f 100644 --- a/src/ev_evports.c +++ b/src/ev_evports.c @@ -28,7 +28,6 @@ #include #include -#include /* * Private data: diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 629c67792b..d7183c5fd6 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include -#include #include #include diff --git a/src/fd.c b/src/fd.c index 82f619625b..d3940bb12a 100644 --- a/src/fd.c +++ b/src/fd.c @@ -92,7 +92,6 @@ #include #include -#include #include struct fdtab *fdtab = NULL; /* array of all the file descriptors */ diff --git a/src/flt_spoe.c b/src/flt_spoe.c index f532d2d851..f5094c02ff 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/src/flt_trace.c b/src/flt_trace.c index 2f55b73d1a..01278bb0ba 100644 --- a/src/flt_trace.c +++ b/src/flt_trace.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include const char *trace_flt_id = "trace filter"; diff --git a/src/frontend.c b/src/frontend.c index 09adbea155..8252c81be1 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include #include -#include #include #include #include diff --git a/src/haproxy.c b/src/haproxy.c index 6488df9b3a..9e2f94a2cb 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -97,6 +97,7 @@ #include #include #include +#include #include #include #include @@ -123,7 +124,6 @@ #include #include #include -#include #include #include #include diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c index c14c885ff8..12bca02c3a 100644 --- a/src/hlua_fcn.c +++ b/src/hlua_fcn.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/src/http_act.c b/src/http_act.c index 06ab3c271c..a688acbaa0 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -38,7 +38,6 @@ #include #include -#include /* Release memory allocated by most of HTTP actions. Concretly, it releases * . diff --git a/src/http_ana.c b/src/http_ana.c index 8e8dd2fa0f..373e399a77 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/http_fetch.c b/src/http_fetch.c index 65fbe877ec..812ede5c7e 100644 --- a/src/http_fetch.c +++ b/src/http_fetch.c @@ -37,7 +37,6 @@ #include #include -#include #include diff --git a/src/listener.c b/src/listener.c index ab0a4a726d..1779642969 100644 --- a/src/listener.c +++ b/src/listener.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/log.c b/src/log.c index 4f095cafd6..4027db28b8 100644 --- a/src/log.c +++ b/src/log.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -36,10 +37,8 @@ #include #include -#include #include -#include #include #include #include diff --git a/src/map.c b/src/map.c index 7beefde746..243676d2e1 100644 --- a/src/map.c +++ b/src/map.c @@ -23,7 +23,6 @@ #include #include -#include #include /* Parse an IPv4 or IPv6 address and store it into the sample. diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 2bb5862620..e13ce55b5d 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,6 @@ #include -#include #include #include diff --git a/src/mux_h1.c b/src/mux_h1.c index ada8bb18b6..75a640847a 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/mworker-prog.c b/src/mworker-prog.c index 0a448beab9..800624f940 100644 --- a/src/mworker-prog.c +++ b/src/mworker-prog.c @@ -23,9 +23,9 @@ #include #include #include +#include #include -#include static int use_program = 0; /* do we use the program section ? */ diff --git a/src/mworker.c b/src/mworker.c index bccffaa583..d891f2fda3 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include diff --git a/src/namespace.c b/src/namespace.c index dfda7a5e32..8b7190ca0e 100644 --- a/src/namespace.c +++ b/src/namespace.c @@ -14,8 +14,8 @@ #include #include #include +#include #include -#include /* Opens the namespace and returns the FD or -1 in case of error * (check errno). diff --git a/src/pattern.c b/src/pattern.c index 0ec22c10db..bbd7faa268 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -16,12 +16,12 @@ #include #include +#include #include #include #include #include -#include #include #include diff --git a/src/peers.c b/src/peers.c index c5d8095915..633f9aeb72 100644 --- a/src/peers.c +++ b/src/peers.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -39,7 +40,6 @@ #include #include -#include #include #include #include diff --git a/src/pool.c b/src/pool.c index 41d9c449a2..78809bb7a5 100644 --- a/src/pool.c +++ b/src/pool.c @@ -21,13 +21,13 @@ #include #include #include +#include #include #include #include #include -#include #ifdef CONFIG_HAP_LOCAL_POOLS /* These are the most common pools, expected to be initialized first. These diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c index cb1853681b..c72c6ac20c 100644 --- a/src/proto_sockpair.c +++ b/src/proto_sockpair.c @@ -32,13 +32,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include static void sockpair_add_listener(struct listener *listener, int port); diff --git a/src/proto_tcp.c b/src/proto_tcp.c index b25779ccd4..63624f600b 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,6 @@ #include #include -#include #include #include #include diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 33c79e9a7a..ea516ba197 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -32,12 +32,12 @@ #include #include #include +#include #include #include #include #include -#include #include static int uxst_bind_listener(struct listener *listener, char *errmsg, int errlen); diff --git a/src/proxy.c b/src/proxy.c index 78d91e6e25..6a0a158a4a 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -41,7 +42,6 @@ #include #include -#include #include #include #include diff --git a/src/raw_sock.c b/src/raw_sock.c index 3453aac1ba..099f50341e 100644 --- a/src/raw_sock.c +++ b/src/raw_sock.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include -#include #include diff --git a/src/regex.c b/src/regex.c index b2f325d7a5..3510f72c88 100644 --- a/src/regex.c +++ b/src/regex.c @@ -15,9 +15,9 @@ #include #include +#include #include #include -#include /* regex trash buffer used by various regex tests */ THREAD_LOCAL regmatch_t pmatch[MAX_MATCH]; /* rm_so, rm_eo for regular expressions */ diff --git a/src/sample.c b/src/sample.c index 23f7bf267b..99b6fd548f 100644 --- a/src/sample.c +++ b/src/sample.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/session.c b/src/session.c index 58e55ee6d5..4169870f9d 100644 --- a/src/session.c +++ b/src/session.c @@ -15,12 +15,12 @@ #include #include #include +#include #include #include #include #include -#include #include #include diff --git a/src/signal.c b/src/signal.c index 6d01548152..1f8ec834c1 100644 --- a/src/signal.c +++ b/src/signal.c @@ -13,9 +13,9 @@ #include #include +#include #include #include -#include /* Principle : we keep an in-order list of the first occurrence of all received * signals. All occurrences of a same signal are grouped though. The signal diff --git a/src/sink.c b/src/sink.c index 93beccf08b..b6e1b857e6 100644 --- a/src/sink.c +++ b/src/sink.c @@ -23,8 +23,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index 43fe01d3bd..d2fd4e1811 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index 3890ca833e..8e6a2e42d1 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/src/ssl_sock.c b/src/ssl_sock.c index a586b62553..1b1b0e47d7 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,6 @@ #include #include #include -#include #include #include diff --git a/src/stats.c b/src/stats.c index 573721566f..40ea9c8bea 100644 --- a/src/stats.c +++ b/src/stats.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -58,7 +59,6 @@ #include #include #include -#include #include #include #include diff --git a/src/stick_table.c b/src/stick_table.c index 3a8d62f449..fdf1b585ad 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/stream.c b/src/stream.c index fc2798d098..eab3356acb 100644 --- a/src/stream.c +++ b/src/stream.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,6 @@ #include #include #include -#include #include #include #include diff --git a/src/tcp_rules.c b/src/tcp_rules.c index e7abdd76f0..a02e25f04e 100644 --- a/src/tcp_rules.c +++ b/src/tcp_rules.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -27,7 +28,6 @@ #include -#include #include #include #include diff --git a/src/trace.c b/src/trace.c index bb9db085ac..997a994fd4 100644 --- a/src/trace.c +++ b/src/trace.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/uri_auth.c b/src/uri_auth.c index 2005bc8124..248431cd7b 100644 --- a/src/uri_auth.c +++ b/src/uri_auth.c @@ -15,10 +15,10 @@ #include #include +#include #include #include -#include /* * Initializes a basic uri_auth structure header and returns a pointer to it. diff --git a/src/wdt.c b/src/wdt.c index 3485c8f5ac..c17d67c3cf 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -15,9 +15,9 @@ #include #include #include +#include #include #include -#include /* diff --git a/src/wurfl.c b/src/wurfl.c index f7992e53c8..57e794e16c 100644 --- a/src/wurfl.c +++ b/src/wurfl.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include #include #include