REORG: include: move fd.h to haproxy/fd{,-t}.h

A few includes were missing in each file. A definition of
struct polled_mask was moved to fd-t.h. The MAX_POLLERS macro was
moved to defaults.h

Stdio used to be silently inherited from whatever path but it's needed
for list_pollers() which takes a FILE* and which can thus not be
forward-declared.
diff --git a/src/checks.c b/src/checks.c
index 499bc51..3d3fbd1 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -52,7 +52,7 @@
 #include <proto/backend.h>
 #include <proto/checks.h>
 #include <proto/stats.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/http_htx.h>
 #include <proto/log.h>
 #include <proto/mux_pt.h>
diff --git a/src/cli.c b/src/cli.c
index df0e0f2..bdfb270 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -48,7 +48,7 @@
 #include <proto/cli.h>
 #include <proto/compression.h>
 #include <proto/stats.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/frontend.h>
 #include <proto/log.h>
diff --git a/src/connection.c b/src/connection.c
index 688be9a..d7c77d2 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -19,7 +19,7 @@
 #include <haproxy/net_helper.h>
 
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/frontend.h>
 #include <proto/proto_tcp.h>
 #include <proto/stream_interface.h>
diff --git a/src/debug.c b/src/debug.c
index 9aef05b..bf2bc1a 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -31,7 +31,7 @@
 #include <types/signal.h>
 
 #include <proto/cli.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/hlua.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
diff --git a/src/dns.c b/src/dns.c
index 0390212..a74bd36 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -38,7 +38,7 @@
 #include <proto/cli.h>
 #include <proto/checks.h>
 #include <proto/dns.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/http_ana.h>
 #include <proto/http_rules.h>
 #include <proto/log.h>
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index 40f5e9c..d5717e7 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -23,7 +23,7 @@
 #include <types/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/signal.h>
 
 
diff --git a/src/ev_evports.c b/src/ev_evports.c
index 9f3158a..0a18bd3 100644
--- a/src/ev_evports.c
+++ b/src/ev_evports.c
@@ -26,7 +26,7 @@
 #include <types/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/log.h>
 #include <proto/signal.h>
 
diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c
index 95a6897..5746f1a 100644
--- a/src/ev_kqueue.c
+++ b/src/ev_kqueue.c
@@ -25,7 +25,7 @@
 #include <types/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/signal.h>
 
 
diff --git a/src/ev_poll.c b/src/ev_poll.c
index 0d0fcaa..344b6d4 100644
--- a/src/ev_poll.c
+++ b/src/ev_poll.c
@@ -25,7 +25,7 @@
 #include <types/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 
 
 #ifndef POLLRDHUP
diff --git a/src/ev_select.c b/src/ev_select.c
index c6c3f43..6a5d2f8 100644
--- a/src/ev_select.c
+++ b/src/ev_select.c
@@ -22,7 +22,7 @@
 #include <types/global.h>
 
 #include <haproxy/activity.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 
 
 /* private data */
diff --git a/src/fd.c b/src/fd.c
index 56a0b7b..60db19c 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -91,7 +91,7 @@
 #include <haproxy/api.h>
 #include <types/global.h>
 
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/log.h>
 #include <haproxy/port_range.h>
 
diff --git a/src/frontend.c b/src/frontend.c
index 22e2acc..8206709 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -32,7 +32,7 @@
 #include <proto/acl.h>
 #include <proto/arg.h>
 #include <proto/channel.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/proto_tcp.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index 57fedf8..3f2dd13 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -113,7 +113,7 @@
 #include <proto/channel.h>
 #include <proto/cli.h>
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/filters.h>
 #include <proto/hlua.h>
 #include <proto/http_rules.h>
diff --git a/src/listener.c b/src/listener.c
index ac7b328..aa935d6 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -30,7 +30,7 @@
 
 #include <proto/acl.h>
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
 #include <proto/listener.h>
diff --git a/src/log.c b/src/log.c
index 353b428..b036c99 100644
--- a/src/log.c
+++ b/src/log.c
@@ -36,7 +36,7 @@
 
 #include <proto/applet.h>
 #include <proto/cli.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/ring.h>
diff --git a/src/mworker.c b/src/mworker.c
index 4b2a7af..4f5ade2 100644
--- a/src/mworker.c
+++ b/src/mworker.c
@@ -28,7 +28,7 @@
 #include <types/signal.h>
 
 #include <proto/cli.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/mworker.h>
diff --git a/src/peers.c b/src/peers.c
index d4011d3..4d16b41 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -37,7 +37,7 @@
 #include <proto/applet.h>
 #include <proto/channel.h>
 #include <proto/cli.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/mux_pt.h>
diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c
index e133a84..0bff96d 100644
--- a/src/proto_sockpair.c
+++ b/src/proto_sockpair.c
@@ -36,7 +36,7 @@
 #include <types/global.h>
 
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/listener.h>
 #include <proto/log.h>
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 2abfd85..9b109f4 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -44,7 +44,7 @@
 #include <proto/arg.h>
 #include <proto/channel.h>
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/http_rules.h>
 #include <proto/listener.h>
 #include <proto/log.h>
diff --git a/src/proto_udp.c b/src/proto_udp.c
index 810c314..a1d9176 100644
--- a/src/proto_udp.c
+++ b/src/proto_udp.c
@@ -11,10 +11,10 @@
  */
 
 #include <types/global.h>
-#include <types/fd.h>
+#include <haproxy/fd-t.h>
 #include <types/proto_udp.h>
 
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 
 /* datagram handler callback */
 void dgram_fd_handler(int fd)
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index 429ca1c..a3eefa9 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -36,7 +36,7 @@
 #include <types/global.h>
 
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/listener.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
diff --git a/src/proxy.c b/src/proxy.c
index a8ca53a..45750b7 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -36,7 +36,7 @@
 #include <proto/applet.h>
 #include <proto/cli.h>
 #include <proto/backend.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/filters.h>
 #include <proto/listener.h>
 #include <proto/log.h>
diff --git a/src/raw_sock.c b/src/raw_sock.c
index 6503b3b..c1af72a 100644
--- a/src/raw_sock.c
+++ b/src/raw_sock.c
@@ -29,7 +29,7 @@
 #include <haproxy/time.h>
 
 #include <proto/connection.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
 #include <proto/pipe.h>
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 44818d0..357828d 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -68,7 +68,7 @@
 #include <proto/channel.h>
 #include <proto/connection.h>
 #include <proto/cli.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/frontend.h>
 #include <proto/http_rules.h>
diff --git a/src/stats.c b/src/stats.c
index b43665c..115b9ad 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -51,7 +51,7 @@
 #include <proto/compression.h>
 #include <proto/dns.h>
 #include <proto/stats.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/frontend.h>
 #include <proto/http_htx.h>
diff --git a/src/stream.c b/src/stream.c
index f0e2c88..904eaef 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -41,7 +41,7 @@
 #include <proto/connection.h>
 #include <proto/dns.h>
 #include <proto/stats.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/frontend.h>
diff --git a/src/task.c b/src/task.c
index eacc3fd..24c3b3e 100644
--- a/src/task.c
+++ b/src/task.c
@@ -20,7 +20,7 @@
 #include <import/eb32sctree.h>
 #include <import/eb32tree.h>
 
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/proxy.h>
 #include <proto/stream.h>
diff --git a/src/thread.c b/src/thread.c
index 2a7ec9a..0ee9332 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -27,7 +27,7 @@
 #include <haproxy/thread.h>
 #include <haproxy/tools.h>
 #include <types/global.h>
-#include <proto/fd.h>
+#include <haproxy/fd.h>
 
 struct thread_info ha_thread_info[MAX_THREADS] = { };
 THREAD_LOCAL struct thread_info *ti = &ha_thread_info[0];