REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/
These ones do not depend on any other file. One used to include
haproxy/api.h but that was solely for stddef.h.
diff --git a/include/common/base64.h b/include/haproxy/base64.h
similarity index 75%
rename from include/common/base64.h
rename to include/haproxy/base64.h
index e53a352..d7dec58 100644
--- a/include/common/base64.h
+++ b/include/haproxy/base64.h
@@ -1,8 +1,8 @@
/*
- * include/common/base64.h
+ * include/haproxy/base64.h
* Ascii to Base64 conversion as described in RFC1421.
*
- * Copyright 2006-2010 Willy Tarreau <w@1wt.eu>
+ * Copyright 2006-2020 Willy Tarreau <w@1wt.eu>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -11,10 +11,10 @@
*
*/
-#ifndef _COMMON_BASE64_H
-#define _COMMON_BASE64_H
+#ifndef _HAPROXY_BASE64_H
+#define _HAPROXY_BASE64_H
-#include <haproxy/api.h>
+#include <stddef.h>
int a2base64(char *in, int ilen, char *out, int olen);
int base64dec(const char *in, size_t ilen, char *out, size_t olen);
@@ -23,4 +23,4 @@
extern const char base64tab[];
-#endif /* _COMMON_BASE64_H */
+#endif /* _HAPROXY_BASE64_H */
diff --git a/include/common/errors.h b/include/haproxy/errors.h
similarity index 93%
rename from include/common/errors.h
rename to include/haproxy/errors.h
index e6b658b..6277701 100644
--- a/include/common/errors.h
+++ b/include/haproxy/errors.h
@@ -1,8 +1,8 @@
/*
- * include/common/errors.h
+ * include/haproxy/errors.h
* Global error macros and constants
*
- * 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_ERRORS_H
-#define _COMMON_ERRORS_H
+#ifndef _HAPROXY_ERRORS_H
+#define _HAPROXY_ERRORS_H
/* These flags may be used in various functions which are called from within
* loops (eg: to start all listeners from all proxies). They provide enough
@@ -56,7 +56,7 @@
PE_ARG_NOT_FOUND, /* argument references something not found */
};
-#endif /* _COMMON_ERRORS_H */
+#endif /* _HAPROXY_ERRORS_H */
/*
* Local variables:
diff --git a/include/common/hash.h b/include/haproxy/hash.h
similarity index 86%
rename from include/common/hash.h
rename to include/haproxy/hash.h
index c17f8c9..cb506c7 100644
--- a/include/common/hash.h
+++ b/include/haproxy/hash.h
@@ -1,8 +1,8 @@
/*
- * include/common/hash.h
+ * include/haproxy/hash.h
* Macros for different hashing function.
*
- * Copyright (C) 2000-2011 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_HASH_H_
-#define _COMMON_HASH_H_
+#ifndef _HAPROXY_HASH_H_
+#define _HAPROXY_HASH_H_
#include <inttypes.h>
@@ -30,4 +30,4 @@
unsigned int hash_crc32(const void *input, int len);
uint32_t hash_crc32c(const void *input, int len);
-#endif /* _COMMON_HASH_H_ */
+#endif /* _HAPROXY_HASH_H_ */
diff --git a/include/proto/stick_table.h b/include/proto/stick_table.h
index 2243d3d..986c775 100644
--- a/include/proto/stick_table.h
+++ b/include/proto/stick_table.h
@@ -23,7 +23,7 @@
#ifndef _PROTO_STICK_TABLE_H
#define _PROTO_STICK_TABLE_H
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/ticks.h>
#include <common/time.h>
#include <types/stick_table.h>
diff --git a/src/51d.c b/src/51d.c
index 13997e3..ceef355 100644
--- a/src/51d.c
+++ b/src/51d.c
@@ -4,7 +4,7 @@
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/buffer.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/hathreads.h>
#include <types/global.h>
#include <proto/arg.h>
diff --git a/src/auth.c b/src/auth.c
index 2d98044..6570eca 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -27,7 +27,7 @@
#include <haproxy/api.h>
#include <types/global.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/hathreads.h>
#include <proto/acl.h>
diff --git a/src/backend.c b/src/backend.c
index f259b39..ece412c 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -22,7 +22,7 @@
#include <haproxy/api.h>
#include <common/buffer.h>
#include <common/debug.h>
-#include <common/hash.h>
+#include <haproxy/hash.h>
#include <common/htx.h>
#include <common/ticks.h>
#include <common/time.h>
diff --git a/src/base64.c b/src/base64.c
index 90e4fb8..53e4d65 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -15,7 +15,7 @@
#include <string.h>
#include <haproxy/api.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#define B64BASE '#' /* arbitrary chosen base value */
#define B64CMIN '+'
diff --git a/src/cache.c b/src/cache.c
index fac9b7d..c4177f7 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -34,7 +34,7 @@
#include <common/cfgparse.h>
-#include <common/hash.h>
+#include <haproxy/hash.h>
#include <common/htx.h>
#include <common/net_helper.h>
diff --git a/src/cfgparse-ssl.c b/src/cfgparse-ssl.c
index e6372fb..3d1f676 100644
--- a/src/cfgparse-ssl.c
+++ b/src/cfgparse-ssl.c
@@ -32,7 +32,7 @@
#include <sys/types.h>
#include <haproxy/api.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <common/cfgparse.h>
#include <common/openssl-compat.h>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 5fd2880..da76aa9 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -36,7 +36,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/chunk.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/standard.h>
#include <common/time.h>
diff --git a/src/cli.c b/src/cli.c
index 9212651..13fc204 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -36,7 +36,7 @@
#include <common/time.h>
#include <common/uri_auth.h>
#include <haproxy/version.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <types/applet.h>
#include <types/global.h>
diff --git a/src/connection.c b/src/connection.c
index fd6a274..a30a2dd 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -15,7 +15,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <common/namespace.h>
-#include <common/hash.h>
+#include <haproxy/hash.h>
#include <common/net_helper.h>
#include <proto/connection.h>
diff --git a/src/da.c b/src/da.c
index 73e59db..c783fb1 100644
--- a/src/da.c
+++ b/src/da.c
@@ -2,7 +2,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/http.h>
#include <types/global.h>
#include <proto/arg.h>
diff --git a/src/dns.c b/src/dns.c
index 92c6dda..b11622c 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -21,7 +21,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/time.h>
#include <common/ticks.h>
#include <common/net_helper.h>
diff --git a/src/fcgi-app.c b/src/fcgi-app.c
index d099228..5b11680 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -13,7 +13,7 @@
#include <haproxy/api.h>
#include <common/chunk.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/standard.h>
#include <types/global.h>
diff --git a/src/filters.c b/src/filters.c
index 9b6bd5b..3d7bb45 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -14,7 +14,7 @@
#include <common/buffer.h>
#include <common/debug.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/htx.h>
#include <common/namespace.h>
#include <common/standard.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index 2351aed..d2bb0de 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -81,10 +81,10 @@
#include <haproxy/api.h>
#include <import/sha1.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <common/cfgparse.h>
#include <common/chunk.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/mini-clist.h>
#include <common/namespace.h>
diff --git a/src/hash.c b/src/hash.c
index 8984ef3..a20b90c 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -14,7 +14,7 @@
*/
-#include <common/hash.h>
+#include <haproxy/hash.h>
unsigned int hash_wt6(const void *input, int len)
diff --git a/src/http_ana.c b/src/http_ana.c
index bd2db1f..4635c38 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <common/debug.h>
#include <common/htx.h>
#include <common/net_helper.h>
diff --git a/src/http_fetch.c b/src/http_fetch.c
index 0ea509c..5d7ae88 100644
--- a/src/http_fetch.c
+++ b/src/http_fetch.c
@@ -17,7 +17,7 @@
#include <time.h>
#include <haproxy/api.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <common/chunk.h>
#include <common/debug.h>
#include <common/h1.h>
diff --git a/src/listener.c b/src/listener.c
index ab9f84b..a1b6ae4 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -20,7 +20,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>
diff --git a/src/mworker-prog.c b/src/mworker-prog.c
index f445c7f..4951063 100644
--- a/src/mworker-prog.c
+++ b/src/mworker-prog.c
@@ -22,7 +22,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <proto/log.h>
#include <proto/mworker.h>
diff --git a/src/namespace.c b/src/namespace.c
index a6d2080..6165994 100644
--- a/src/namespace.c
+++ b/src/namespace.c
@@ -12,8 +12,8 @@
#include <haproxy/api.h>
#include <common/namespace.h>
-#include <common/hash.h>
-#include <common/errors.h>
+#include <haproxy/hash.h>
+#include <haproxy/errors.h>
#include <proto/log.h>
#include <proto/signal.h>
#include <types/global.h>
diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c
index 8a0773c..ff642f2 100644
--- a/src/proto_sockpair.c
+++ b/src/proto_sockpair.c
@@ -28,7 +28,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index f1e65c5..063f4b3 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -32,7 +32,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/namespace.h>
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index e9b85dd..5fc976a 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -28,7 +28,7 @@
#include <haproxy/api.h>
#include <common/debug.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
#include <common/time.h>
diff --git a/src/protocol.c b/src/protocol.c
index 6c4341e..3a11bdd 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -14,7 +14,7 @@
#include <sys/socket.h>
#include <haproxy/api.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/mini-clist.h>
#include <common/standard.h>
diff --git a/src/proxy.c b/src/proxy.c
index a62df4d..b5bc5ae 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -19,7 +19,7 @@
#include <haproxy/api.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/memory.h>
#include <common/time.h>
diff --git a/src/sample.c b/src/sample.c
index e4841fd..0715e14 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -20,12 +20,12 @@
#include <types/global.h>
#include <common/chunk.h>
-#include <common/hash.h>
+#include <haproxy/hash.h>
#include <common/http.h>
#include <common/net_helper.h>
#include <common/standard.h>
#include <common/uri_auth.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <proto/arg.h>
#include <proto/auth.h>
diff --git a/src/server.c b/src/server.c
index 9d6e7a6..791747c 100644
--- a/src/server.c
+++ b/src/server.c
@@ -18,7 +18,7 @@
#include <import/xxhash.h>
#include <common/cfgparse.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/namespace.h>
#include <common/time.h>
diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c
index 4a5f1c1..9011df9 100644
--- a/src/ssl_ckch.c
+++ b/src/ssl_ckch.c
@@ -21,8 +21,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <common/base64.h>
-#include <common/errors.h>
+#include <haproxy/base64.h>
+#include <haproxy/errors.h>
#include <common/standard.h>
#include <import/ebsttree.h>
diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c
index 38cffc8..1d77362 100644
--- a/src/ssl_crtlist.c
+++ b/src/ssl_crtlist.c
@@ -15,7 +15,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/standard.h>
#include <dirent.h>
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 79e81d7..39e4f22 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -47,12 +47,12 @@
#include <common/buffer.h>
#include <common/chunk.h>
#include <common/debug.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <common/openssl-compat.h>
#include <common/standard.h>
#include <common/ticks.h>
#include <common/time.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <import/ebpttree.h>
#include <import/ebsttree.h>
diff --git a/src/stats.c b/src/stats.c
index 8cb1840..0887925 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -36,7 +36,7 @@
#include <common/time.h>
#include <common/uri_auth.h>
#include <haproxy/version.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <types/applet.h>
#include <types/cli.h>
diff --git a/src/uri_auth.c b/src/uri_auth.c
index 06266f3..a2c1426 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -14,7 +14,7 @@
#include <string.h>
#include <haproxy/api.h>
-#include <common/base64.h>
+#include <haproxy/base64.h>
#include <common/uri_auth.h>
#include <types/stats.h>
diff --git a/src/wurfl.c b/src/wurfl.c
index f5de52a..8869461 100644
--- a/src/wurfl.c
+++ b/src/wurfl.c
@@ -5,7 +5,7 @@
#include <common/cfgparse.h>
#include <common/chunk.h>
#include <common/buffer.h>
-#include <common/errors.h>
+#include <haproxy/errors.h>
#include <types/global.h>
#include <proto/arg.h>
#include <proto/log.h>