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

stdlib and list were missing from listener.h, otherwise it was OK.
diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
index 63d6919..cdced56 100644
--- a/contrib/prometheus-exporter/service-prometheus.c
+++ b/contrib/prometheus-exporter/service-prometheus.c
@@ -20,6 +20,7 @@
 #include <haproxy/http.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/htx.h>
+#include <haproxy/listener.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 
@@ -28,7 +29,6 @@
 #include <proto/applet.h>
 #include <proto/backend.h>
 #include <haproxy/compression.h>
-#include <proto/listener.h>
 #include <haproxy/pipe.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
diff --git a/include/types/listener.h b/include/haproxy/listener-t.h
similarity index 98%
rename from include/types/listener.h
rename to include/haproxy/listener-t.h
index 52df218..da432d8 100644
--- a/include/types/listener.h
+++ b/include/haproxy/listener-t.h
@@ -1,5 +1,5 @@
 /*
- * include/types/listener.h
+ * include/haproxy/listener-t.h
  * This file defines the structures needed to manage listeners.
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
@@ -19,22 +19,22 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_LISTENER_H
-#define _TYPES_LISTENER_H
+#ifndef _HAPROXY_LISTENER_T_H
+#define _HAPROXY_LISTENER_T_H
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#ifdef USE_OPENSSL
-#include <haproxy/api-t.h>
-#include <haproxy/openssl-compat.h>
-#endif
+#include <import/eb32tree.h>
 
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/thread.h>
+#include <haproxy/api-t.h>
 
-#include <import/eb32tree.h>
+#ifdef USE_OPENSSL
+#include <haproxy/openssl-compat.h>
+#endif
 
 /* Some pointer types reference below */
 struct task;
@@ -304,7 +304,7 @@
 };
 
 
-#endif /* _TYPES_LISTENER_H */
+#endif /* _HAPROXY_LISTENER_T_H */
 
 /*
  * Local variables:
diff --git a/include/proto/listener.h b/include/haproxy/listener.h
similarity index 96%
rename from include/proto/listener.h
rename to include/haproxy/listener.h
index ca7dc9c..3d3d118 100644
--- a/include/proto/listener.h
+++ b/include/haproxy/listener.h
@@ -1,5 +1,5 @@
 /*
- * include/proto/listener.h
+ * include/haproxy/listener.h
  * This file declares listener management primitives.
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
@@ -19,12 +19,15 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_LISTENER_H
-#define _PROTO_LISTENER_H
+#ifndef _HAPROXY_LISTENER_H
+#define _HAPROXY_LISTENER_H
 
+#include <stdlib.h>
 #include <string.h>
 
-#include <types/listener.h>
+#include <haproxy/api.h>
+#include <haproxy/list.h>
+#include <haproxy/listener-t.h>
 #include <types/cli.h>
 
 /* This function tries to temporarily disable a listener, depending on the OS
@@ -185,7 +188,7 @@
 
 extern struct accept_queue_ring accept_queue_rings[MAX_THREADS] __attribute__((aligned(64)));
 
-#endif /* _PROTO_LISTENER_H */
+#endif /* _HAPROXY_LISTENER_H */
 
 /*
  * Local variables:
diff --git a/include/haproxy/obj_type.h b/include/haproxy/obj_type.h
index 42235c6..ad49502 100644
--- a/include/haproxy/obj_type.h
+++ b/include/haproxy/obj_type.h
@@ -23,11 +23,11 @@
 #define _HAPROXY_OBJ_TYPE_H
 
 #include <haproxy/api.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
 #include <types/applet.h>
 #include <types/connection.h>
-#include <types/listener.h>
 #include <types/proxy.h>
 #include <types/server.h>
 #include <types/stream.h>
diff --git a/include/proto/connection.h b/include/proto/connection.h
index f6ea74c..753aea4 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -24,10 +24,10 @@
 
 #include <import/ist.h>
 #include <haproxy/api.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/obj_type.h>
 #include <haproxy/pool.h>
 #include <types/connection.h>
-#include <types/listener.h>
 #include <haproxy/fd.h>
 #include <proto/session.h>
 #include <proto/task.h>
diff --git a/include/proto/proxy.h b/include/proto/proxy.h
index caf1c86..5e17ffe 100644
--- a/include/proto/proxy.h
+++ b/include/proto/proxy.h
@@ -23,12 +23,12 @@
 #define _PROTO_PROXY_H
 
 #include <haproxy/api.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
 #include <types/applet.h>
 #include <types/global.h>
 #include <types/proxy.h>
-#include <types/listener.h>
 #include <haproxy/freq_ctr.h>
 
 extern struct proxy *proxies_list;
diff --git a/include/proto/ssl_sock.h b/include/proto/ssl_sock.h
index 2cbd60b..e29c1e7 100644
--- a/include/proto/ssl_sock.h
+++ b/include/proto/ssl_sock.h
@@ -26,7 +26,6 @@
 #include <haproxy/openssl-compat.h>
 
 #include <types/connection.h>
-#include <types/listener.h>
 #include <types/proxy.h>
 #include <types/ssl_sock.h>
 #include <types/stream_interface.h>
diff --git a/include/types/connection.h b/include/types/connection.h
index d324567..dfc8694 100644
--- a/include/types/connection.h
+++ b/include/types/connection.h
@@ -28,8 +28,8 @@
 #include <haproxy/api-t.h>
 #include <import/ist.h>
 
-#include <types/listener.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/port_range-t.h>
 #include <haproxy/protocol-t.h>
 
diff --git a/include/types/global.h b/include/types/global.h
index 9e60851..f753660 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -28,7 +28,6 @@
 #include <haproxy/thread.h>
 
 #include <haproxy/freq_ctr-t.h>
-#include <types/listener.h>
 #include <types/proxy.h>
 #include <types/task.h>
 #include <types/vars.h>
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 362b62e..af33021 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -43,7 +43,6 @@
 #include <types/checks.h>
 #include <types/filters.h>
 #include <haproxy/freq_ctr-t.h>
-#include <types/listener.h>
 #include <types/log.h>
 #include <types/sample.h>
 #include <types/server.h>
diff --git a/include/types/server.h b/include/types/server.h
index e74a268..770a472 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -29,6 +29,7 @@
 #include <haproxy/dns-t.h>
 #include <haproxy/api-t.h>
 #include <haproxy/list-t.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/thread.h>
 #include <haproxy/openssl-compat.h>
diff --git a/include/types/ssl_sock.h b/include/types/ssl_sock.h
index b535e4d..f7366d3 100644
--- a/include/types/ssl_sock.h
+++ b/include/types/ssl_sock.h
@@ -32,6 +32,7 @@
 #include <haproxy/buf-t.h>
 #include <haproxy/thread.h>
 #include <haproxy/list-t.h>
+#include <haproxy/listener-t.h>
 #include <haproxy/openssl-compat.h>
 #include <haproxy/ssl_ckch-t.h>
 #include <haproxy/ssl_crtlist-t.h>
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index e4bad66..d2bd8d4 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -18,12 +18,12 @@
 #include <haproxy/compression-t.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/http_rules.h>
+#include <haproxy/listener.h>
 #include <types/stats.h>
 
 #include <proto/acl.h>
 #include <proto/checks.h>
 #include <proto/connection.h>
-#include <proto/listener.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
diff --git a/src/cfgparse-ssl.c b/src/cfgparse-ssl.c
index c93c51a..aeb6f84 100644
--- a/src/cfgparse-ssl.c
+++ b/src/cfgparse-ssl.c
@@ -34,11 +34,11 @@
 #include <haproxy/api.h>
 #include <haproxy/base64.h>
 #include <common/cfgparse.h>
+#include <haproxy/listener.h>
 #include <haproxy/openssl-compat.h>
 
 #include <types/ssl_sock.h>
 
-#include <proto/listener.h>
 #include <proto/ssl_sock.h>
 
 
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 99c5c24..1dfdbc2 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -47,6 +47,7 @@
 #include <haproxy/lb_fas.h>
 #include <haproxy/lb_fwlc.h>
 #include <haproxy/lb_fwrr.h>
+#include <haproxy/listener.h>
 #include <haproxy/mailers-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
@@ -68,7 +69,6 @@
 #include <proto/stats.h>
 #include <proto/filters.h>
 #include <proto/lb_map.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
 #include <proto/http_ana.h>
diff --git a/src/cli.c b/src/cli.c
index db1900d..7eb3bc2 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -31,6 +31,7 @@
 #include <haproxy/dns-t.h>
 #include <haproxy/frontend.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/mworker-t.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
@@ -56,7 +57,6 @@
 #include <proto/pattern.h>
 #include <haproxy/pipe.h>
 #include <haproxy/protocol.h>
-#include <proto/listener.h>
 #include <proto/map.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index a154123..ebf9ae3 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -92,6 +92,7 @@
 #include <haproxy/http_rules.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/mworker.h>
 #include <haproxy/namespace.h>
 #include <haproxy/net_helper.h>
@@ -119,7 +120,6 @@
 #include <proto/connection.h>
 #include <haproxy/fd.h>
 #include <proto/filters.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/pattern.h>
 #include <haproxy/protocol.h>
diff --git a/src/listener.c b/src/listener.c
index 80289b1..152473e 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -22,6 +22,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 
@@ -33,7 +34,6 @@
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
-#include <proto/listener.h>
 #include <haproxy/protocol.h>
 #include <haproxy/proto_sockpair.h>
 #include <proto/sample.h>
diff --git a/src/mworker.c b/src/mworker.c
index fda5052..4ba43d2 100644
--- a/src/mworker.c
+++ b/src/mworker.c
@@ -20,6 +20,7 @@
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/mworker.h>
 #include <haproxy/version.h>
 
@@ -30,7 +31,6 @@
 
 #include <proto/cli.h>
 #include <haproxy/fd.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/signal.h>
diff --git a/src/peers.c b/src/peers.c
index 899d5b4..8a07cdb 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -30,7 +30,6 @@
 #include <haproxy/thread.h>
 
 #include <types/global.h>
-#include <types/listener.h>
 #include <types/peers.h>
 #include <types/stats.h>
 
diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c
index 0bff96d..7d7dce4 100644
--- a/src/proto_sockpair.c
+++ b/src/proto_sockpair.c
@@ -29,6 +29,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/version.h>
@@ -38,7 +39,6 @@
 #include <proto/connection.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
 #include <proto/task.h>
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 88da331..2988007 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -35,6 +35,7 @@
 #include <haproxy/errors.h>
 #include <haproxy/http_rules.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/tools.h>
 #include <haproxy/namespace.h>
 
@@ -46,7 +47,6 @@
 #include <proto/channel.h>
 #include <proto/connection.h>
 #include <haproxy/fd.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
diff --git a/src/proto_uxst.c b/src/proto_uxst.c
index a3eefa9..f0a38e7 100644
--- a/src/proto_uxst.c
+++ b/src/proto_uxst.c
@@ -29,6 +29,7 @@
 #include <haproxy/api.h>
 #include <haproxy/errors.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <haproxy/version.h>
@@ -37,7 +38,6 @@
 
 #include <proto/connection.h>
 #include <haproxy/fd.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <haproxy/protocol.h>
 #include <proto/task.h>
diff --git a/src/proxy.c b/src/proxy.c
index 43ae7cf..2b5368d 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -20,6 +20,7 @@
 #include <haproxy/api.h>
 #include <common/cfgparse.h>
 #include <haproxy/errors.h>
+#include <haproxy/listener.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/pool.h>
 #include <haproxy/time.h>
@@ -38,7 +39,6 @@
 #include <proto/backend.h>
 #include <haproxy/fd.h>
 #include <proto/filters.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/proto_tcp.h>
 #include <proto/http_ana.h>
diff --git a/src/session.c b/src/session.c
index 619ff06..f752e07 100644
--- a/src/session.c
+++ b/src/session.c
@@ -12,13 +12,13 @@
 
 #include <haproxy/api.h>
 #include <haproxy/http.h>
+#include <haproxy/listener.h>
 #include <haproxy/pool.h>
 
 #include <types/global.h>
 #include <types/session.h>
 
 #include <proto/connection.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/session.h>
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index efab3af..abfef91 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -75,7 +75,6 @@
 #include <proto/cli.h>
 #include <haproxy/fd.h>
 #include <haproxy/freq_ctr.h>
-#include <proto/listener.h>
 #include <proto/pattern.h>
 #include <proto/proto_tcp.h>
 #include <proto/http_ana.h>
diff --git a/src/stats.c b/src/stats.c
index 79fff90..8f17413 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -35,6 +35,7 @@
 #include <haproxy/htx.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
+#include <haproxy/listener.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -57,7 +58,6 @@
 #include <proto/log.h>
 #include <proto/pattern.h>
 #include <haproxy/pipe.h>
-#include <proto/listener.h>
 #include <proto/map.h>
 #include <proto/proxy.h>
 #include <proto/sample.h>
diff --git a/src/stream.c b/src/stream.c
index afbf83a..8e76979 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -47,7 +47,6 @@
 #include <haproxy/fd.h>
 #include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
-#include <proto/listener.h>
 #include <proto/log.h>
 #include <proto/session.h>
 #include <proto/stream.h>
diff --git a/src/tools.c b/src/tools.c
index 2b02a24..cfec66a 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -43,11 +43,11 @@
 #include <haproxy/chunk.h>
 #include <haproxy/dns.h>
 #include <haproxy/hlua.h>
+#include <haproxy/listener.h>
 #include <haproxy/namespace.h>
 #include <haproxy/tools.h>
 #include <types/global.h>
 #include <proto/applet.h>
-#include <proto/listener.h>
 #include <haproxy/proto_udp.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream_interface.h>