From: Willy Tarreau Date: Wed, 3 Jun 2020 16:09:46 +0000 (+0200) Subject: REORG: tools: split common/standard.h into haproxy/tools{,-t}.h X-Git-Tag: v2.2-dev9~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48fbcae07c00cee2d40967e37b2018959c5347d4;p=thirdparty%2Fhaproxy.git REORG: tools: split common/standard.h into haproxy/tools{,-t}.h And also rename standard.c to tools.c. The original split between tools.h and standard.h dates from version 1.3-dev and was mostly an accident. This patch moves the files back to what they were expected to be, and takes care of not changing anything else. However this time tools.h was split between functions and types, because it contains a small number of commonly used macros and structures (e.g. name_desc) which in turn cause the massive list of includes of tools.h to conflict with the callers. They remain the ugliest files of the whole project and definitely need to be cleaned and split apart. A few types are defined there only for functions provided there, and some parts are even OS-specific and should move somewhere else, such as the symbol resolution code. --- diff --git a/Makefile b/Makefile index 6e4cad605c..9d70f3645c 100644 --- a/Makefile +++ b/Makefile @@ -792,7 +792,7 @@ endif OBJS = src/mux_h2.o src/stream.o src/mux_fcgi.o src/cfgparse-listen.o \ src/http_ana.o src/stats.o src/mux_h1.o src/flt_spoe.o src/server.o \ src/cfgparse.o src/checks.o src/backend.o src/log.o src/peers.o \ - src/cli.o src/haproxy.o src/stick_table.o src/standard.o src/sample.o \ + src/cli.o src/haproxy.o src/stick_table.o src/tools.o src/sample.o \ src/proxy.o src/stream_interface.o src/pattern.o src/dns.o \ src/proto_tcp.o src/listener.o src/cfgparse-global.o src/h1.o \ src/http_rules.o src/http_fetch.o src/cache.o src/session.o \ diff --git a/contrib/mod_defender/defender.c b/contrib/mod_defender/defender.c index fdf80d8862..8bc3e9735d 100644 --- a/contrib/mod_defender/defender.c +++ b/contrib/mod_defender/defender.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff --git a/include/haproxy/tools-t.h b/include/haproxy/tools-t.h new file mode 100644 index 0000000000..bb99a23737 --- /dev/null +++ b/include/haproxy/tools-t.h @@ -0,0 +1,113 @@ +/* + * include/haproxy/tools-t.h + * This files contains some general purpose macros and structures. + * + * 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_TOOLS_T_H +#define _HAPROXY_TOOLS_T_H + +/* size used for max length of decimal representation of long long int. */ +#define NB_LLMAX_STR (sizeof("-9223372036854775807")-1) + +/* number of itoa_str entries */ +#define NB_ITOA_STR 16 + +/* maximum quoted string length (truncated above) */ +#define QSTR_SIZE 200 +#define NB_QSTR 10 + +/* returns 1 only if only zero or one bit is set in X, which means that X is a + * power of 2, and 0 otherwise */ +#define POWEROF2(x) (((x) & ((x)-1)) == 0) + +/* return an integer of type with only the highest bit set. may be + * both a variable or a type. + */ +#define MID_RANGE(ret) ((typeof(ret))1 << (8*sizeof(ret) - 1)) + +/* return the largest possible integer of type , with all bits set */ +#define MAX_RANGE(ret) (~(typeof(ret))0) + +/* DEFNULL() returns either the argument as-is, or NULL if absent. This is for + * use in macros arguments. + */ +#define DEFNULL(...) _FIRST_ARG(NULL, ##__VA_ARGS__, NULL) +#define _FIRST_ARG(a, b, ...) b + +/* special return values for the time parser (parse_time_err()) */ +#define PARSE_TIME_UNDER ((char *)1) +#define PARSE_TIME_OVER ((char *)2) + +/* unit flags to pass to parse_time_err() */ +#define TIME_UNIT_US 0x0000 +#define TIME_UNIT_MS 0x0001 +#define TIME_UNIT_S 0x0002 +#define TIME_UNIT_MIN 0x0003 +#define TIME_UNIT_HOUR 0x0004 +#define TIME_UNIT_DAY 0x0005 +#define TIME_UNIT_MASK 0x0007 + +#define SEC 1 +#define MINUTE (60 * SEC) +#define HOUR (60 * MINUTE) +#define DAY (24 * HOUR) + +/* UTF-8 decoder status */ +#define UTF8_CODE_OK 0x00 +#define UTF8_CODE_OVERLONG 0x10 +#define UTF8_CODE_INVRANGE 0x20 +#define UTF8_CODE_BADSEQ 0x40 + +/* HAP_STRING() makes a string from a literal while HAP_XSTRING() first + * evaluates the argument and is suited to pass macros. + * + * They allow macros like PCRE_MAJOR to be defined without quotes, which + * is convenient for applications that want to test its value. + */ +#define HAP_STRING(...) #__VA_ARGS__ +#define HAP_XSTRING(...) HAP_STRING(__VA_ARGS__) + +/* operators to compare values. They're ordered that way so that the lowest bit + * serves as a negation for the test and contains all tests that are not equal. + */ +enum { + STD_OP_LE = 0, STD_OP_GT = 1, + STD_OP_EQ = 2, STD_OP_NE = 3, + STD_OP_GE = 4, STD_OP_LT = 5, +}; + +enum http_scheme { + SCH_HTTP, + SCH_HTTPS, +}; + +/* output format used by url2sa() */ +struct split_url { + enum http_scheme scheme; + const char *host; + int host_len; +}; + +/* generic structure associating a name and a value, for use in arrays */ +struct name_desc { + const char *name; + const char *desc; +}; + +#endif /* _HAPROXY_TOOLS_T_H */ diff --git a/include/common/standard.h b/include/haproxy/tools.h similarity index 93% rename from include/common/standard.h rename to include/haproxy/tools.h index ab8c075784..627675a95b 100644 --- a/include/common/standard.h +++ b/include/haproxy/tools.h @@ -1,8 +1,8 @@ /* - * include/common/standard.h + * include/haproxy/tools.h * This files contains some general purpose functions and macros. * - * Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu + * 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 @@ -19,8 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _COMMON_STANDARD_H -#define _COMMON_STANDARD_H +#ifndef _HAPROXY_TOOLS_H +#define _HAPROXY_TOOLS_H #ifdef USE_BACKTRACE #define _GNU_SOURCE @@ -37,23 +37,14 @@ #include #include #include +#include +#include #include #include #include #include -#include -#include #include - -/* size used for max length of decimal representation of long long int. */ -#define NB_LLMAX_STR (sizeof("-9223372036854775807")-1) - -/* number of itoa_str entries */ -#define NB_ITOA_STR 16 - -/* maximum quoted string length (truncated above) */ -#define QSTR_SIZE 200 -#define NB_QSTR 10 +#include /****** string-specific macros and functions ******/ /* if a > max, then bound to . The macro returns the new */ @@ -62,52 +53,8 @@ /* if a < min, then bound to . The macro returns the new */ #define LBOUND(a, min) ({ typeof(a) b = (min); if ((a) < b) (a) = b; (a); }) -/* returns 1 only if only zero or one bit is set in X, which means that X is a - * power of 2, and 0 otherwise */ -#define POWEROF2(x) (((x) & ((x)-1)) == 0) - #define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0) -/* return an integer of type with only the highest bit set. may be - * both a variable or a type. - */ -#define MID_RANGE(ret) ((typeof(ret))1 << (8*sizeof(ret) - 1)) - -/* return the largest possible integer of type , with all bits set */ -#define MAX_RANGE(ret) (~(typeof(ret))0) - -/* DEFNULL() returns either the argument as-is, or NULL if absent. This is for - * use in macros arguments. - */ -#define DEFNULL(...) _FIRST_ARG(NULL, ##__VA_ARGS__, NULL) -#define _FIRST_ARG(a, b, ...) b - -/* operators to compare values. They're ordered that way so that the lowest bit - * serves as a negation for the test and contains all tests that are not equal. - */ -enum { - STD_OP_LE = 0, STD_OP_GT = 1, - STD_OP_EQ = 2, STD_OP_NE = 3, - STD_OP_GE = 4, STD_OP_LT = 5, -}; - -enum http_scheme { - SCH_HTTP, - SCH_HTTPS, -}; - -struct split_url { - enum http_scheme scheme; - const char *host; - int host_len; -}; - -/* generic structure associating a name and a value, for use in arrays */ -struct name_desc { - const char *name; - const char *desc; -}; - extern THREAD_LOCAL int itoa_idx; /* index of next itoa_str to use */ /* @@ -588,24 +535,6 @@ extern time_t my_timegm(const struct tm *tm); extern const char *parse_time_err(const char *text, unsigned *ret, unsigned unit_flags); extern const char *parse_size_err(const char *text, unsigned *ret); -/* special return values for the time parser */ -#define PARSE_TIME_UNDER ((char *)1) -#define PARSE_TIME_OVER ((char *)2) - -/* unit flags to pass to parse_time_err */ -#define TIME_UNIT_US 0x0000 -#define TIME_UNIT_MS 0x0001 -#define TIME_UNIT_S 0x0002 -#define TIME_UNIT_MIN 0x0003 -#define TIME_UNIT_HOUR 0x0004 -#define TIME_UNIT_DAY 0x0005 -#define TIME_UNIT_MASK 0x0007 - -#define SEC 1 -#define MINUTE (60 * SEC) -#define HOUR (60 * MINUTE) -#define DAY (24 * HOUR) - /* * Parse binary string written in hexadecimal (source) and store the decoded * result into binstr and set binstrlen to the length of binstr. Memory for @@ -1003,12 +932,6 @@ static inline unsigned long caddr_clr_flags(unsigned long caddr, unsigned int da return caddr & ~(unsigned long)(data & 3); } -/* UTF-8 decoder status */ -#define UTF8_CODE_OK 0x00 -#define UTF8_CODE_OVERLONG 0x10 -#define UTF8_CODE_INVRANGE 0x20 -#define UTF8_CODE_BADSEQ 0x40 - unsigned char utf8_next(const char *s, int len, unsigned int *c); static inline unsigned char utf8_return_code(unsigned int code) @@ -1112,13 +1035,4 @@ static inline int32_t ha_random() return ha_random32() >> 1; } -/* HAP_STRING() makes a string from a literal while HAP_XSTRING() first - * evaluates the argument and is suited to pass macros. - * - * They allow macros like PCRE_MAJOR to be defined without quotes, which - * is convenient for applications that want to test its value. - */ -#define HAP_STRING(...) #__VA_ARGS__ -#define HAP_XSTRING(...) HAP_STRING(__VA_ARGS__) - -#endif /* _COMMON_STANDARD_H */ +#endif /* _HAPROXY_TOOLS_H */ diff --git a/include/proto/stats.h b/include/proto/stats.h index 01c08ba136..f98a5ececb 100644 --- a/include/proto/stats.h +++ b/include/proto/stats.h @@ -23,7 +23,7 @@ #ifndef _PROTO_STATS_H #define _PROTO_STATS_H -#include +#include #include #include #include diff --git a/include/proto/stick_table.h b/include/proto/stick_table.h index 1a5a13d0f8..7f35cfa1c7 100644 --- a/include/proto/stick_table.h +++ b/include/proto/stick_table.h @@ -24,7 +24,7 @@ #define _PROTO_STICK_TABLE_H #include -#include +#include #include #include #include diff --git a/include/proto/trace.h b/include/proto/trace.h index f16763d7f1..3a7020512d 100644 --- a/include/proto/trace.h +++ b/include/proto/trace.h @@ -23,7 +23,7 @@ #define _PROTO_TRACE_H #include -#include +#include #include #include #include diff --git a/src/acl.c b/src/acl.c index 14a0e0ba6c..16e7753146 100644 --- a/src/acl.c +++ b/src/acl.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/src/action.c b/src/action.c index 1125eca1e9..17716b5ea0 100644 --- a/src/action.c +++ b/src/action.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/activity.c b/src/activity.c index c0da3e84bd..59ae4fad41 100644 --- a/src/activity.c +++ b/src/activity.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/arg.c b/src/arg.c index 5adffe3a0f..9c4fa44f86 100644 --- a/src/arg.c +++ b/src/arg.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cfgparse.c b/src/cfgparse.c index b3a66b829a..2f9ed1b84f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/checks.c b/src/checks.c index 4a1b87fda2..cd1649b17f 100644 --- a/src/checks.c +++ b/src/checks.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/chunk.c b/src/chunk.c index 917a4f93e0..f9e6fe5d22 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include diff --git a/src/cli.c b/src/cli.c index 932af30389..df0e0f28d8 100644 --- a/src/cli.c +++ b/src/cli.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/debug.c b/src/debug.c index 5b25ab7576..9aef05ba5d 100644 --- a/src/debug.c +++ b/src/debug.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 65ff1b50da..40f5e9cbb5 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/src/fcgi-app.c b/src/fcgi-app.c index eb78807b96..d846c25dbd 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include diff --git a/src/filters.c b/src/filters.c index 5cfac40397..31f9f10b61 100644 --- a/src/filters.c +++ b/src/filters.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c index ac4a3bf2e5..462ee25958 100644 --- a/src/flt_http_comp.c +++ b/src/flt_http_comp.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/flt_trace.c b/src/flt_trace.c index 94aef8cb39..64dc564df0 100644 --- a/src/flt_trace.c +++ b/src/flt_trace.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/src/freq_ctr.c b/src/freq_ctr.c index 8249a3aa55..17d27720c6 100644 --- a/src/freq_ctr.c +++ b/src/freq_ctr.c @@ -11,7 +11,7 @@ */ #include -#include +#include #include #include diff --git a/src/frontend.c b/src/frontend.c index 4a66c49c2d..22e2acc497 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/haproxy.c b/src/haproxy.c index 4bf229cd9f..57fedf86e6 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -92,7 +92,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/hlua.c b/src/hlua.c index d73abec4f9..3de0bea1aa 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/hpack-dec.c b/src/hpack-dec.c index e318ac3639..c9808d362d 100644 --- a/src/hpack-dec.c +++ b/src/hpack-dec.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/http.c b/src/http.c index ae315a8287..f8d78763e2 100644 --- a/src/http.c +++ b/src/http.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include /* It is about twice as fast on recent architectures to lookup a byte in a * table than to perform a boolean AND or OR between two tests. Refer to diff --git a/src/http_acl.c b/src/http_acl.c index 780962af26..8ff4ab3e4a 100644 --- a/src/http_acl.c +++ b/src/http_acl.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/http_act.c b/src/http_act.c index a5ce9d780f..165cae27de 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/http_conv.c b/src/http_conv.c index 72cb4af68f..e321dbb051 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/http_fetch.c b/src/http_fetch.c index 221ac94170..5d03dc7c5f 100644 --- a/src/http_fetch.c +++ b/src/http_fetch.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/http_rules.c b/src/http_rules.c index 94aff63c79..77ac2cbe3e 100644 --- a/src/http_rules.c +++ b/src/http_rules.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/lb_chash.c b/src/lb_chash.c index 0899ee76ef..0fc18d92d3 100644 --- a/src/lb_chash.c +++ b/src/lb_chash.c @@ -17,7 +17,7 @@ */ #include -#include +#include #include #include diff --git a/src/listener.c b/src/listener.c index 2f9c800b5f..ac7b3287ed 100644 --- a/src/listener.c +++ b/src/listener.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/log.c b/src/log.c index 5778994b77..353b4283c3 100644 --- a/src/log.c +++ b/src/log.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/src/map.c b/src/map.c index 771fcc8130..8dc1b51962 100644 --- a/src/map.c +++ b/src/map.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/src/pattern.c b/src/pattern.c index f2692f0df0..d4988b172f 100644 --- a/src/pattern.c +++ b/src/pattern.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/peers.c b/src/peers.c index 882f34ab9f..ef09468244 100644 --- a/src/peers.c +++ b/src/peers.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/pool.c b/src/pool.c index 2ad2be6297..4ff97b6608 100644 --- a/src/pool.c +++ b/src/pool.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c index dfba155558..e133a84a77 100644 --- a/src/proto_sockpair.c +++ b/src/proto_sockpair.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 42c034e031..b9aa82400c 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 1dce1a93d1..429ca1cc34 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/protocol.c b/src/protocol.c index defb19721f..f739444a0a 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include diff --git a/src/raw_sock.c b/src/raw_sock.c index 744544b23f..6503b3b849 100644 --- a/src/raw_sock.c +++ b/src/raw_sock.c @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/regex.c b/src/regex.c index 764704da11..bebbaa798c 100644 --- a/src/regex.c +++ b/src/regex.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include /* regex trash buffer used by various regex tests */ diff --git a/src/sample.c b/src/sample.c index e1e4d9cca3..149ede8641 100644 --- a/src/sample.c +++ b/src/sample.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index 9011df9bcb..61dd353846 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index 1d77362f47..e7c394cc57 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/src/ssl_sample.c b/src/ssl_sample.c index de3abeeb4e..5f8cbd798a 100644 --- a/src/ssl_sample.c +++ b/src/ssl_sample.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 476469f3dd..61560125ec 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/stats.c b/src/stats.c index d7d581d4e3..b43665c013 100644 --- a/src/stats.c +++ b/src/stats.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/stick_table.c b/src/stick_table.c index fcbd587810..8ceafa3c66 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/stream_interface.c b/src/stream_interface.c index dbd9cdfe35..921b19111e 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/task.c b/src/task.c index 5663abac7e..eacc3fdee7 100644 --- a/src/task.c +++ b/src/task.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/tcp_rules.c b/src/tcp_rules.c index c08d716a78..012bfd3108 100644 --- a/src/tcp_rules.c +++ b/src/tcp_rules.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/thread.c b/src/thread.c index 47c5ab9dd3..2a7ec9ae45 100644 --- a/src/thread.c +++ b/src/thread.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/src/time.c b/src/time.c index a6aaf40339..f81ffff57b 100644 --- a/src/time.c +++ b/src/time.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/src/standard.c b/src/tools.c similarity index 99% rename from src/standard.c rename to src/tools.c index 8e9722e349..fbec3f50cd 100644 --- a/src/standard.c +++ b/src/tools.c @@ -36,10 +36,13 @@ #include #include +#include +#include + #include #include #include -#include +#include #include #include #include @@ -50,9 +53,6 @@ #include #include -#include -#include - /* This macro returns false if the test __x is false. Many * of the following parsing function must be abort the processing * if it returns 0, so this macro is useful for writing light code. diff --git a/src/wdt.c b/src/wdt.c index 86de286404..1248bebbb8 100644 --- a/src/wdt.c +++ b/src/wdt.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include