REORG: include: move the error reporting functions to from log.h to errors.h
Most of the files dealing with error reports have to include log.h in order
to access ha_alert(), ha_warning() etc. But while these functions don't
depend on anything, log.h depends on a lot of stuff because it deals with
log-formats and samples. As a result it's impossible not to embark long
dependencies when using ha_warning() or qfprintf().
This patch moves these low-level functions to errors.h, which already
defines the error codes used at the same places. About half of the users
of log.h could be adjusted, sometimes revealing other issues such as
missing tools.h. Interestingly the total preprocessed size shrunk by
4%.
diff --git a/src/uri_auth.c b/src/uri_auth.c
index 248431c..57dbadb 100644
--- a/src/uri_auth.c
+++ b/src/uri_auth.c
@@ -15,7 +15,8 @@
#include <haproxy/api.h>
#include <haproxy/base64.h>
-#include <haproxy/log.h>
+#include <haproxy/errors.h>
+#include <haproxy/list.h>
#include <haproxy/stats-t.h>
#include <haproxy/uri_auth.h>