]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: tools: split common/standard.h into haproxy/tools{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Jun 2020 16:09:46 +0000 (18:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
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.

59 files changed:
Makefile
contrib/mod_defender/defender.c
include/haproxy/tools-t.h [new file with mode: 0644]
include/haproxy/tools.h [moved from include/common/standard.h with 93% similarity]
include/proto/stats.h
include/proto/stick_table.h
include/proto/trace.h
src/acl.c
src/action.c
src/activity.c
src/arg.c
src/cfgparse.c
src/checks.c
src/chunk.c
src/cli.c
src/debug.c
src/ev_epoll.c
src/fcgi-app.c
src/filters.c
src/flt_http_comp.c
src/flt_trace.c
src/freq_ctr.c
src/frontend.c
src/haproxy.c
src/hlua.c
src/hpack-dec.c
src/http.c
src/http_acl.c
src/http_act.c
src/http_conv.c
src/http_fetch.c
src/http_rules.c
src/lb_chash.c
src/listener.c
src/log.c
src/map.c
src/pattern.c
src/peers.c
src/pool.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_uxst.c
src/protocol.c
src/raw_sock.c
src/regex.c
src/sample.c
src/ssl_ckch.c
src/ssl_crtlist.c
src/ssl_sample.c
src/ssl_sock.c
src/stats.c
src/stick_table.c
src/stream_interface.c
src/task.c
src/tcp_rules.c
src/thread.c
src/time.c
src/tools.c [moved from src/standard.c with 99% similarity]
src/wdt.c

index 6e4cad605c0de8bff1576f4951725b1b53953134..9d70f3645c939f89600dfc8e090ed54fa77fcc03 100644 (file)
--- 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            \
index fdf80d8862abe7a3493b322272c50cdd0d8c1a85..8bc3e9735de4804ab8bda6a838a8ab09bb7b8e12 100644 (file)
@@ -19,7 +19,7 @@
 #include <stdarg.h>
 
 #include <haproxy/api.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/chunk.h>
 #include <haproxy/time.h>
 
diff --git a/include/haproxy/tools-t.h b/include/haproxy/tools-t.h
new file mode 100644 (file)
index 0000000..bb99a23
--- /dev/null
@@ -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 <ret> with only the highest bit set. <ret> 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 <ret>, 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 */
similarity index 93%
rename from include/common/standard.h
rename to include/haproxy/tools.h
index ab8c075784410cc950946b670f31a67497f5f3c9..627675a95b7c6c1b8ca1f12fb1bccbc32b397a9c 100644 (file)
@@ -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
 #include <sys/un.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <import/eb32tree.h>
+#include <import/eb32sctree.h>
 #include <haproxy/api.h>
 #include <haproxy/intops.h>
 #include <haproxy/chunk.h>
 #include <haproxy/namespace-t.h>
-#include <import/eb32tree.h>
-#include <import/eb32sctree.h>
 #include <haproxy/protocol-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
+#include <haproxy/tools-t.h>
 
 /****** string-specific macros and functions ******/
 /* if a > max, then bound <a> to <max>. The macro returns the new <a> */
 /* if a < min, then bound <a> to <min>. The macro returns the new <a> */
 #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 <ret> with only the highest bit set. <ret> 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 <ret>, 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 */
index 01c08ba13617be4b204a8c9ff7f4e7a614756cbf..f98a5ececb8cb15decb1948cb8332388e81800c3 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef _PROTO_STATS_H
 #define _PROTO_STATS_H
 
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/api.h>
 #include <types/applet.h>
 #include <types/stream_interface.h>
index 1a5a13d0f8db83272daa435eebe299e6aed1f41a..7f35cfa1c77ec66aa5fed872f3061619874faf15 100644 (file)
@@ -24,7 +24,7 @@
 #define _PROTO_STICK_TABLE_H
 
 #include <haproxy/errors.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <types/stick_table.h>
index f16763d7f19716dadf40f431a374cf9933f88114..3a7020512d1e738a3f01a0f0914481ad75544f14 100644 (file)
@@ -23,7 +23,7 @@
 #define _PROTO_TRACE_H
 
 #include <haproxy/api.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <import/ist.h>
 #include <haproxy/list.h>
 #include <types/log.h>
index 14a0e0ba6c9b42d3a9323bcfadb9c4e465e44f38..16e775314670e0429c1eee297fe669638ab28b41 100644 (file)
--- a/src/acl.c
+++ b/src/acl.c
@@ -16,7 +16,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <common/uri_auth.h>
 
 #include <types/global.h>
index 1125eca1e94b91565951a7827300294325724def..17716b5ea040e9d47c66459765874d13989928de 100644 (file)
@@ -13,7 +13,7 @@
 #include <haproxy/api.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <proto/action.h>
 #include <proto/log.h>
index c0da3e84bd4dfc5b54847bb5dc260ae43b04d7e0..59ae4fad415c6ababd9d29f8367d5f5925ca57eb 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/thread-t.h>
 #include <haproxy/activity-t.h>
 #include <proto/channel.h>
index 5adffe3a0f26135d009530d2ee97435efb12cf28..9c4fa44f864fa4271c5d90e19ec9dffae4fc49e0 100644 (file)
--- a/src/arg.c
+++ b/src/arg.c
@@ -14,7 +14,7 @@
 #include <sys/socket.h>
 #include <arpa/inet.h>
 
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/chunk.h>
 #include <types/global.h>
 #include <proto/arg.h>
index b3a66b829a994cffbd41a81e86a69c0971b05d7d..2f9ed1b84fecd15c80874e14c226dd0f6a93a546 100644 (file)
@@ -38,7 +38,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/errors.h>
 #include <haproxy/pool.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
 #include <haproxy/namespace.h>
index 4a1b87fda23d14f7dffc8acd7a559190e624c13b..cd1649b17f4bf0ccaa9322e8582ba3ffd9cc8f88 100644 (file)
@@ -36,7 +36,7 @@
 #include <haproxy/istbuf.h>
 #include <haproxy/list.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/thread.h>
 #include <haproxy/http.h>
index 917a4f93e022f859460361463710e4e0bad4cbbd..f9e6fe5d2278f2539dc0ab1f9b458a00777b013d 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/chunk.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/global.h>
 
index 932af30389bdd27e0b23503e6449506e2546e233..df0e0f28d8a26a94197100f17dfdb8030bbe4bc4 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -29,7 +29,7 @@
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
index 5b25ab757670f1702f2bf86cb3e1fa55ea8baf44..9aef05ba5de724046c7efb1d61c9ded16110df12 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/thread.h>
 #include <import/ist.h>
 #include <haproxy/net_helper.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/global.h>
 #include <types/signal.h>
index 65ff1b50dae88191b44b69e4017527f82fa99ea7..40f5e9cbb54569b8c1fcb2e9d3c9a9d66a070f28 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/thread-t.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 
index eb78807b968c40a528da7d0818f8a6eba68f0bd7..d846c25dbdf859f6de05cb194eb36a6096d6b490 100644 (file)
@@ -15,7 +15,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/global.h>
 
index 5cfac403976da3e6adfd80e51ad20482cf0550bd..31f9f10b6156ca16a164250974a110350658caff 100644 (file)
@@ -16,7 +16,7 @@
 #include <haproxy/errors.h>
 #include <haproxy/htx.h>
 #include <haproxy/namespace.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/filters.h>
 #include <types/http_ana.h>
index ac4a3bf2e52d964a6e951fd6540e63a358045b87..462ee259583a03bbff0e86450a45a91f091d64fc 100644 (file)
@@ -16,7 +16,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/htx.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/compression.h>
 #include <types/filters.h>
index 94aef8cb39eb8e0dd3952dc680fe3eb948398e7c..64dc564df074cae5bb8c9eca57596a6643063c61 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/htx.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 
 #include <types/channel.h>
index 8249a3aa55b3a9bb496e855540512e01ad084ab9..17d27720c69715127c0d259ed4fa022d3025a19d 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include <haproxy/api.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/freq_ctr.h>
 
index 4a66c49c2d9aa09a08f7606da81f2af72dd481f8..22e2acc4978eb5a0db3c415616c3be81d75c3b6a 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/chunk.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 
 #include <types/global.h>
index 4bf229cd9f7be9d21a53b1f2fa5504e7c438fbce..57fedf86e6c67439fe78fd4db8758c349bd4f111 100644 (file)
@@ -92,7 +92,7 @@
 #include <haproxy/net_helper.h>
 #include <haproxy/openssl-compat.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
 #include <haproxy/version.h>
index d73abec4f9e599c8cbf9af941424632c4013afc6..3de0bea1aa82bb3bdf461ae4541112f081ffc1ee 100644 (file)
@@ -29,7 +29,7 @@
 #include <haproxy/regex.h>
 #include <haproxy/xref.h>
 #include <haproxy/h1.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/cli.h>
 #include <types/hlua.h>
index e318ac3639a85eba526c676a34711ea45f897395..c9808d362d0cbb4c8517d9dc0a16c764e6291019 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/hpack-dec.h>
 #include <haproxy/hpack-huff.h>
 #include <haproxy/hpack-tbl.h>
index ae315a82879675f55ae62b347439c910de6b6a1e..f8d78763e264920360d130973c28d92bcd15611d 100644 (file)
@@ -13,7 +13,7 @@
 #include <ctype.h>
 #include <haproxy/api.h>
 #include <haproxy/http.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 /* 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
index 780962af2607c106213616dd6913fac1f93fafa5..8ff4ab3e4acdf2ca8dc6e16235d82b07f67740a1 100644 (file)
@@ -20,7 +20,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/http.h>
 #include <haproxy/pool.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/version.h>
 
 #include <types/global.h>
index a5ce9d780f896fec5c20f34d67dac821cb314747..165cae27dee3a2ce3b31da45aaa111c020e1ed32 100644 (file)
@@ -22,7 +22,7 @@
 #include <haproxy/http.h>
 #include <haproxy/pool.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <common/uri_auth.h>
 #include <haproxy/version.h>
 
index 72cb4af68ff88331c70ac8c6806f175e6199cccc..e321dbb0519be6ecdd0aebd958ac6ce57d6aa178 100644 (file)
@@ -20,7 +20,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/http.h>
 #include <haproxy/pool.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/version.h>
 
 #include <types/capture.h>
index 221ac94170ad03e0892100abfd04f19cb1c5bda2..5d03dc7c5fbf43ca042fdbedf3ae97ea25ba6d64 100644 (file)
@@ -23,7 +23,7 @@
 #include <haproxy/http.h>
 #include <haproxy/htx.h>
 #include <haproxy/pool.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/version.h>
 
 #include <types/global.h>
index 94aff63c79e40412dd0648f8b745fa6cf0425133..77ac2cbe3ebfb5cafe54101ab8a1093a7a7192f0 100644 (file)
@@ -21,7 +21,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/http.h>
 #include <haproxy/pool.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/version.h>
 
 #include <types/capture.h>
index 0899ee76efaf8bb4ae9fba0b7a738c74e6b2adae..0fc18d92d3a9f9e5fc11d9f64e816abc8a67a657 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #include <haproxy/api.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <import/eb32tree.h>
 
 #include <types/global.h>
index 2f9c800b5ffc03fe6655111dabac5de540e9a23d..ac7b3287ed0678362882e8c273f223fcedb33ecd 100644 (file)
@@ -22,7 +22,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 
 #include <types/global.h>
index 5778994b77a82f26019b7251a4522c2fb0b896ba..353b4283c37b7a4a799a9a51f402f5c42953174c 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -26,7 +26,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/http.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/version.h>
 
index 771fcc81309abdaa5c346b60d5e82323b70593bf..8dc1b51962ad251ecd5d38f2f3f83f40a13c174d 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -14,7 +14,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/applet.h>
 #include <types/cli.h>
index f2692f0df066d7106c37640dec6144a443c0a415..d4988b172f92b4b9f156b3285858237adfb2d627 100644 (file)
@@ -17,7 +17,7 @@
 #include <haproxy/api.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/global.h>
 #include <types/pattern.h>
index 882f34ab9fd442593ef61344f75ad00656aabb68..ef094682445e467ed12bac238da8d08552741f84 100644 (file)
@@ -23,7 +23,7 @@
 #include <haproxy/api.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/time.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/thread.h>
 
 #include <types/global.h>
index 2ad2be629786e20c3f706ff15fe147abb1721706..4ff97b66087744d5afec92ee7b6a3ed2bacb97b6 100644 (file)
@@ -21,7 +21,7 @@
 #include <haproxy/thread.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <haproxy/activity-t.h>
 
index dfba155558ab776c762d4a6e2868e04a7b6d47b4..e133a84a771d9f1fa906d5e878c4db05fe4a7221 100644 (file)
@@ -29,7 +29,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/version.h>
 
index 42c034e031af206082958794ff71d30626fc908e..b9aa82400c6f6fde7f981ef5eb44d19531c1e345 100644 (file)
@@ -33,7 +33,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/namespace.h>
 
 #include <types/action.h>
index 1dce1a93d1a2527f829d77585fa49a1815d3f692..429ca1cc34b95cdbe5f56ddaa87dd84d324604ab 100644 (file)
@@ -29,7 +29,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/version.h>
 
index defb19721fbc72c5470df94da1af54833bea88bf..f739444a0a66b7b2491d52fe223323b4d102a6b6 100644 (file)
@@ -16,7 +16,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <haproxy/protocol.h>
 
index 744544b23fd121175ffe40d4fc5141f147ce4630..6503b3b8496270ac04471b8fdce61ecfefb679aa 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/buf.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 
index 764704da110ba4892435ecc55d5aca042830ce63..bebbaa798c88281d34096cf503bd28eb42ba4dc9 100644 (file)
@@ -17,7 +17,7 @@
 #include <haproxy/api.h>
 #include <types/global.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <proto/log.h>
 
 /* regex trash buffer used by various regex tests */
index e1e4d9cca324c4112f0986183d3601618c7d8143..149ede86419eb6ef39bb820daa77038984981e55 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/http.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <common/uri_auth.h>
 #include <haproxy/base64.h>
 
index 9011df9bcb79c3eee5e3d4607d4f947f2f0a497a..61dd35384657889a0c92598a95560db5c3c70600 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <haproxy/base64.h>
 #include <haproxy/errors.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <import/ebsttree.h>
 
index 1d77362f47f0703a1d0f3bc5dad98e3b86d6e416..e7c394cc57922bc0e6c615924d42bcc2cf72088b 100644 (file)
@@ -16,7 +16,7 @@
 #include <sys/types.h>
 
 #include <haproxy/errors.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <dirent.h>
 #include <import/ebpttree.h>
index de3abeeb4ec6d608bce0191f6deee78f840f69a4..5f8cbd798a3fa4ce66f3a201a09fc95f0247c9c1 100644 (file)
@@ -23,7 +23,7 @@
 #include <haproxy/api.h>
 #include <haproxy/buf-t.h>
 #include <haproxy/openssl-compat.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 
 #include <types/sample.h>
 #include <types/ssl_sock.h>
index 476469f3dd2edb2943f512eac41cc72694f68f32..61560125ec4553be90b1a4a76b59115db3494ab4 100644 (file)
@@ -48,7 +48,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/errors.h>
 #include <haproxy/openssl-compat.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <haproxy/base64.h>
index d7d581d4e3500b3a91a63b71449dbcce394fe804..b43665c0137f09aa52844272545eb02925697bcc 100644 (file)
@@ -31,7 +31,7 @@
 #include <haproxy/htx.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
index fcbd5878106925eba1f9ef94828dcb9ce4e5d9fc..8ceafa3c668ec320d96f682bc1d8f63dfd6c41ae 100644 (file)
@@ -19,7 +19,7 @@
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <haproxy/net_helper.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 
 #include <import/ebmbtree.h>
index dbd9cdfe35817250074f361d76e79b88925a487b..921b19111e1700a66837e3805c761a6a4a6911be 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <haproxy/api.h>
 #include <haproxy/dynbuf.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 
index 5663abac7ec5320cdd440d37655d5dc88391dfba..eacc3fdee7993d6e04e858d6d8da25bf0c329462 100644 (file)
@@ -15,7 +15,7 @@
 #include <haproxy/api.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <import/eb32sctree.h>
 #include <import/eb32tree.h>
index c08d716a78f24733b38c33d8cc4629f0c35edcda..012bfd3108b94c7a9fb994bd3647113637df1367 100644 (file)
@@ -12,7 +12,7 @@
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/list.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 
index 47c5ab9dd3d2ec3c28e5c487d83f5afb5244de11..2a7ec9ae452fce675345a3d8fd3d8e7c6d988b2d 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <common/cfgparse.h>
 #include <haproxy/thread.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <types/global.h>
 #include <proto/fd.h>
 
index a6aaf4033987777d989c0e7e4940f6676ae45568..f81ffff57b63b889b1c6eb5c64bdb8f599a8dbee 100644 (file)
@@ -14,7 +14,7 @@
 #include <sys/time.h>
 
 #include <haproxy/api.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/thread-t.h>
 
similarity index 99%
rename from src/standard.c
rename to src/tools.c
index 8e9722e3497d375eb7c728ad4177a8ba8b1095f8..fbec3f50cdd8e186862a48bd694cdf3408fd1807 100644 (file)
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <import/eb32tree.h>
+#include <import/eb32sctree.h>
+
 #include <haproxy/api.h>
 #include <haproxy/chunk.h>
 #include <haproxy/namespace.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <types/global.h>
 #include <proto/applet.h>
 #include <proto/dns.h>
@@ -50,9 +53,6 @@
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
-#include <import/eb32tree.h>
-#include <import/eb32sctree.h>
-
 /* 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.
index 86de286404168b25a7f96d6c0eaa7159649c3535..1248bebbb88cea6f4e0ff73c7a187c6767bdaf42 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -15,7 +15,7 @@
 #include <haproxy/api.h>
 #include <haproxy/debug.h>
 #include <haproxy/thread.h>
-#include <common/standard.h>
+#include <haproxy/tools.h>
 #include <types/global.h>
 #include <types/signal.h>
 #include <proto/log.h>