REORG: include: update all files to use haproxy/api.h or api-t.h if needed

All files that were including one of the following include files have
been updated to only include haproxy/api.h or haproxy/api-t.h once instead:

  - common/config.h
  - common/compat.h
  - common/compiler.h
  - common/defaults.h
  - common/initcall.h
  - common/tools.h

The choice is simple: if the file only requires type definitions, it includes
api-t.h, otherwise it includes the full api.h.

In addition, in these files, explicit includes for inttypes.h and limits.h
were dropped since these are now covered by api.h and api-t.h.

No other change was performed, given that this patch is large and
affects 201 files. At least one (tools.h) was already freestanding and
didn't get the new one added.
diff --git a/include/proto/acl.h b/include/proto/acl.h
index dd6dae5..28b49c4 100644
--- a/include/proto/acl.h
+++ b/include/proto/acl.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_ACL_H
 #define _PROTO_ACL_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/acl.h>
 #include <proto/sample.h>
 
diff --git a/include/proto/activity.h b/include/proto/activity.h
index 673d274..26365ca 100644
--- a/include/proto/activity.h
+++ b/include/proto/activity.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_ACTIVITY_H
 #define _PROTO_ACTIVITY_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/hathreads.h>
 #include <common/time.h>
 #include <types/activity.h>
diff --git a/include/proto/applet.h b/include/proto/applet.h
index 14fbca2..ea8bc0b 100644
--- a/include/proto/applet.h
+++ b/include/proto/applet.h
@@ -24,7 +24,7 @@
 
 #include <stdlib.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <common/mini-clist.h>
 #include <types/applet.h>
diff --git a/include/proto/auth.h b/include/proto/auth.h
index eea5df5..853e38c 100644
--- a/include/proto/auth.h
+++ b/include/proto/auth.h
@@ -13,7 +13,7 @@
 #ifndef _PROTO_AUTH_H
 #define _PROTO_AUTH_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/auth.h>
 
 extern struct userlist *userlist;
diff --git a/include/proto/backend.h b/include/proto/backend.h
index 5764c13..5160492 100644
--- a/include/proto/backend.h
+++ b/include/proto/backend.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_BACKEND_H
 #define _PROTO_BACKEND_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/time.h>
 
 #include <types/backend.h>
diff --git a/include/proto/channel.h b/include/proto/channel.h
index 175d311..16954ba 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/chunk.h>
 #include <common/htx.h>
 #include <common/ticks.h>
diff --git a/include/proto/connection.h b/include/proto/connection.h
index 8629438..9b1e3d8 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_CONNECTION_H
 #define _PROTO_CONNECTION_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/ist.h>
 #include <common/memory.h>
 #include <types/connection.h>
diff --git a/include/proto/fd.h b/include/proto/fd.h
index 8848437..a3c476d 100644
--- a/include/proto/fd.h
+++ b/include/proto/fd.h
@@ -27,7 +27,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/ticks.h>
 #include <common/time.h>
 #include <types/fd.h>
diff --git a/include/proto/freq_ctr.h b/include/proto/freq_ctr.h
index 63febb2..7413803 100644
--- a/include/proto/freq_ctr.h
+++ b/include/proto/freq_ctr.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_FREQ_CTR_H
 #define _PROTO_FREQ_CTR_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/standard.h>
 #include <common/time.h>
 #include <common/hathreads.h>
diff --git a/include/proto/frontend.h b/include/proto/frontend.h
index 61d0409..37d484c 100644
--- a/include/proto/frontend.h
+++ b/include/proto/frontend.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_FRONTEND_H
 #define _PROTO_FRONTEND_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/stream.h>
 
 int frontend_accept(struct stream *s);
diff --git a/include/proto/http_ana.h b/include/proto/http_ana.h
index 8943576..cdfa87e 100644
--- a/include/proto/http_ana.h
+++ b/include/proto/http_ana.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PROTO_HTTP_H
 #define _PROTO_PROTO_HTTP_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/htx.h>
 #include <types/channel.h>
 #include <types/http_ana.h>
diff --git a/include/proto/http_fetch.h b/include/proto/http_fetch.h
index 562e703..22c793f 100644
--- a/include/proto/http_fetch.h
+++ b/include/proto/http_fetch.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_HTTP_FETCH_H
 #define _PROTO_HTTP_FETCH_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/htx.h>
 #include <types/arg.h>
 #include <types/channel.h>
diff --git a/include/proto/http_rules.h b/include/proto/http_rules.h
index 3e57b9d..27c4b6a 100644
--- a/include/proto/http_rules.h
+++ b/include/proto/http_rules.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_HTTP_RULES_H
 #define _PROTO_HTTP_RULES_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/mini-clist.h>
 #include <types/action.h>
 #include <types/proxy.h>
diff --git a/include/proto/lb_chash.h b/include/proto/lb_chash.h
index 679dff3..0a44967 100644
--- a/include/proto/lb_chash.h
+++ b/include/proto/lb_chash.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_LB_CHASH_H
 #define _PROTO_LB_CHASH_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/proxy.h>
 #include <types/server.h>
 
diff --git a/include/proto/lb_fas.h b/include/proto/lb_fas.h
index 602c4f6..4e1f02d 100644
--- a/include/proto/lb_fas.h
+++ b/include/proto/lb_fas.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_LB_FAS_H
 #define _PROTO_LB_FAS_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/proxy.h>
 #include <types/server.h>
 
diff --git a/include/proto/lb_fwlc.h b/include/proto/lb_fwlc.h
index 8c56746..a7a46ff 100644
--- a/include/proto/lb_fwlc.h
+++ b/include/proto/lb_fwlc.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_LB_FWLC_H
 #define _PROTO_LB_FWLC_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/proxy.h>
 #include <types/server.h>
 
diff --git a/include/proto/lb_fwrr.h b/include/proto/lb_fwrr.h
index 1189c38..c23a471 100644
--- a/include/proto/lb_fwrr.h
+++ b/include/proto/lb_fwrr.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_LB_FWRR_H
 #define _PROTO_LB_FWRR_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/proxy.h>
 #include <types/server.h>
 
diff --git a/include/proto/lb_map.h b/include/proto/lb_map.h
index cf7349e..0dc089b 100644
--- a/include/proto/lb_map.h
+++ b/include/proto/lb_map.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_LB_MAP_H
 #define _PROTO_LB_MAP_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/proxy.h>
 #include <types/server.h>
 
diff --git a/include/proto/log.h b/include/proto/log.h
index 6e342e3..a84d612 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <syslog.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <common/hathreads.h>
 
diff --git a/include/proto/mux_pt.h b/include/proto/mux_pt.h
index 33c4e32..d61305a 100644
--- a/include/proto/mux_pt.h
+++ b/include/proto/mux_pt.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_MUX_PT_H
 #define _PROTO_MUX_PT_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/connection.h>
 
 extern const struct mux_ops mux_pt_ops;
diff --git a/include/proto/obj_type.h b/include/proto/obj_type.h
index 799732b..f4816b1 100644
--- a/include/proto/obj_type.h
+++ b/include/proto/obj_type.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_OBJ_TYPE_H
 #define _PROTO_OBJ_TYPE_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <types/applet.h>
 #include <types/connection.h>
diff --git a/include/proto/pattern.h b/include/proto/pattern.h
index 39514b1..2d51d95 100644
--- a/include/proto/pattern.h
+++ b/include/proto/pattern.h
@@ -24,7 +24,7 @@
 
 #include <string.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/standard.h>
 #include <types/pattern.h>
 
diff --git a/include/proto/payload.h b/include/proto/payload.h
index 9674832..481b613 100644
--- a/include/proto/payload.h
+++ b/include/proto/payload.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PROTO_PAYLOAD_H
 #define _PROTO_PROTO_PAYLOAD_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/sample.h>
 #include <types/stream.h>
 
diff --git a/include/proto/peers.h b/include/proto/peers.h
index 74e20da..fbe6cf6 100644
--- a/include/proto/peers.h
+++ b/include/proto/peers.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PEERS_H
 #define _PROTO_PEERS_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/ticks.h>
 #include <common/time.h>
 #include <proto/connection.h>
diff --git a/include/proto/pipe.h b/include/proto/pipe.h
index 0c02165..4dd3dd6 100644
--- a/include/proto/pipe.h
+++ b/include/proto/pipe.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PIPE_H
 #define _PROTO_PIPE_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/pipe.h>
 
 extern int pipes_used;	/* # of pipes in use (2 fds each) */
diff --git a/include/proto/proto_tcp.h b/include/proto/proto_tcp.h
index daac1d8..347305b 100644
--- a/include/proto/proto_tcp.h
+++ b/include/proto/proto_tcp.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PROTO_TCP_H
 #define _PROTO_PROTO_TCP_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/action.h>
 #include <types/task.h>
 #include <proto/stick_table.h>
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index db4cb89..630a011 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_PROXY_H
 #define _PROTO_PROXY_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/ticks.h>
 #include <common/time.h>
 #include <types/applet.h>
diff --git a/include/proto/queue.h b/include/proto/queue.h
index a7ab63b..8ef9179 100644
--- a/include/proto/queue.h
+++ b/include/proto/queue.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_QUEUE_H
 #define _PROTO_QUEUE_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <common/mini-clist.h>
 
diff --git a/include/proto/server.h b/include/proto/server.h
index f8fed31..4c4b4bf 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -24,7 +24,7 @@
 
 #include <unistd.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/time.h>
 #include <types/applet.h>
 #include <types/dns.h>
diff --git a/include/proto/session.h b/include/proto/session.h
index a5b95a8..61a7b00 100644
--- a/include/proto/session.h
+++ b/include/proto/session.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_SESSION_H
 #define _PROTO_SESSION_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/buffer.h>
 #include <common/debug.h>
 #include <common/memory.h>
diff --git a/include/proto/stats.h b/include/proto/stats.h
index d20beea..5342e12 100644
--- a/include/proto/stats.h
+++ b/include/proto/stats.h
@@ -23,7 +23,7 @@
 #ifndef _PROTO_STATS_H
 #define _PROTO_STATS_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/applet.h>
 #include <types/stream_interface.h>
 #include <types/stats.h>
diff --git a/include/proto/stream.h b/include/proto/stream.h
index 69153df..752c183 100644
--- a/include/proto/stream.h
+++ b/include/proto/stream.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_STREAM_H
 #define _PROTO_STREAM_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <types/action.h>
 #include <types/stream.h>
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 490ee5e..98ccb28 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -24,7 +24,7 @@
 
 #include <stdlib.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/stream.h>
 #include <types/stream_interface.h>
 #include <proto/applet.h>
diff --git a/include/proto/task.h b/include/proto/task.h
index 52b284d..a42431a 100644
--- a/include/proto/task.h
+++ b/include/proto/task.h
@@ -25,7 +25,7 @@
 
 #include <sys/time.h>
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <common/memory.h>
 #include <common/mini-clist.h>
 #include <common/standard.h>
diff --git a/include/proto/tcp_rules.h b/include/proto/tcp_rules.h
index bf920a1..b9a4c93 100644
--- a/include/proto/tcp_rules.h
+++ b/include/proto/tcp_rules.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_TCP_RULES_H
 #define _PROTO_TCP_RULES_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/action.h>
 #include <types/task.h>
 #include <proto/stick_table.h>
diff --git a/include/proto/template.h b/include/proto/template.h
index f7f9e55..c6a11c2 100644
--- a/include/proto/template.h
+++ b/include/proto/template.h
@@ -22,7 +22,7 @@
 #ifndef _PROTO_TEMPLATE_H
 #define _PROTO_TEMPLATE_H
 
-#include <common/config.h>
+#include <haproxy/api.h>
 #include <types/template.h>
 
 
diff --git a/include/proto/trace.h b/include/proto/trace.h
index ece2329..ef88079 100644
--- a/include/proto/trace.h
+++ b/include/proto/trace.h
@@ -22,9 +22,8 @@
 #ifndef _PROTO_TRACE_H
 #define _PROTO_TRACE_H
 
+#include <haproxy/api.h>
 #include <common/buffer.h>
-#include <common/compat.h>
-#include <common/config.h>
 #include <common/ist.h>
 #include <common/mini-clist.h>
 #include <types/log.h>