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

The port ranges didn't depend on anything. However they were missing
some includes such as stdlib and api-t.h which were added.
diff --git a/include/haproxy/port_range-t.h b/include/haproxy/port_range-t.h
new file mode 100644
index 0000000..2841166
--- /dev/null
+++ b/include/haproxy/port_range-t.h
@@ -0,0 +1,40 @@
+/*
+ * include/haproxy/port_range-t.h
+ * This file defines the prt_range type
+ *
+ * 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
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_PORT_RANGE_T_H
+#define _HAPROXY_PORT_RANGE_T_H
+
+#include <netinet/in.h>
+#include <haproxy/api-t.h>
+
+struct port_range {
+	int size, get, put_h, put_t;	/* range size, and get/put positions */
+	uint16_t ports[0];		/* array of <size> ports, in host byte order */
+};
+
+#endif /* _HAPROXY_PORT_RANGE_T_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/include/proto/port_range.h b/include/haproxy/port_range.h
similarity index 68%
rename from include/proto/port_range.h
rename to include/haproxy/port_range.h
index c651fa8..be0160b 100644
--- a/include/proto/port_range.h
+++ b/include/haproxy/port_range.h
@@ -1,28 +1,31 @@
 /*
-  include/proto/port_range.h
-  This file defines everything needed to manage port ranges
-
-  Copyright (C) 2000-2009 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
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+ * include/haproxy/port_range.h
+ * This file defines everything needed to manage port ranges
+ *
+ * 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
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
 
-#ifndef _PROTO_PORT_RANGE_H
-#define _PROTO_PORT_RANGE_H
+#ifndef _HAPROXY_PORT_RANGE_H
+#define _HAPROXY_PORT_RANGE_H
 
-#include <types/port_range.h>
+#include <stdlib.h>
+#include <haproxy/atomic.h>
+#include <haproxy/api.h>
+#include <haproxy/port_range-t.h>
 
 #define GET_NEXT_OFF(range, off) ((off) == (range)->size - 1 ? 0 : (off) + 1)
 
@@ -91,7 +94,7 @@
 	return ret;
 }
 
-#endif /* _PROTO_PORT_RANGE_H */
+#endif /* _HAPROXY_PORT_RANGE_H */
 
 /*
  * Local variables:
diff --git a/include/types/connection.h b/include/types/connection.h
index 3f72855..55f136f 100644
--- a/include/types/connection.h
+++ b/include/types/connection.h
@@ -30,7 +30,7 @@
 
 #include <types/listener.h>
 #include <types/obj_type.h>
-#include <types/port_range.h>
+#include <haproxy/port_range-t.h>
 #include <haproxy/protocol-t.h>
 
 #include <netinet/in_systm.h>
diff --git a/include/types/fd.h b/include/types/fd.h
index 505291f..66fab44 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -24,7 +24,7 @@
 
 #include <haproxy/api-t.h>
 #include <import/ist.h>
-#include <types/port_range.h>
+#include <haproxy/port_range-t.h>
 
 /* Direction for each FD event update */
 enum {
diff --git a/include/types/port_range.h b/include/types/port_range.h
deleted file mode 100644
index 33455d2..0000000
--- a/include/types/port_range.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  include/types/port_range.h
-  This file defines everything needed to manage port ranges
-
-  Copyright (C) 2000-2009 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
-  License as published by the Free Software Foundation, version 2.1
-  exclusively.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-*/
-
-#ifndef _TYPES_PORT_RANGE_H
-#define _TYPES_PORT_RANGE_H
-
-#include <netinet/in.h>
-
-struct port_range {
-	int size, get, put_h, put_t;	/* range size, and get/put positions */
-	uint16_t ports[0];		/* array of <size> ports, in host byte order */
-};
-
-#endif /* _TYPES_PORT_RANGE_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
diff --git a/src/checks.c b/src/checks.c
index cd1649b..499bc51 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -57,7 +57,7 @@
 #include <proto/log.h>
 #include <proto/mux_pt.h>
 #include <proto/queue.h>
-#include <proto/port_range.h>
+#include <haproxy/port_range.h>
 #include <proto/proto_tcp.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
diff --git a/src/fd.c b/src/fd.c
index c7bc54e..56a0b7b 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -93,7 +93,7 @@
 
 #include <proto/fd.h>
 #include <proto/log.h>
-#include <proto/port_range.h>
+#include <haproxy/port_range.h>
 
 struct fdtab *fdtab = NULL;     /* array of all the file descriptors */
 struct polled_mask *polled_mask = NULL; /* Array for the polled_mask of each fd */
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index b9aa824..2abfd85 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -48,7 +48,7 @@
 #include <proto/http_rules.h>
 #include <proto/listener.h>
 #include <proto/log.h>
-#include <proto/port_range.h>
+#include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
 #include <proto/http_ana.h>
 #include <proto/proto_tcp.h>
diff --git a/src/server.c b/src/server.c
index 324dc97..5c26de3 100644
--- a/src/server.c
+++ b/src/server.c
@@ -34,7 +34,7 @@
 #include <proto/cli.h>
 #include <proto/checks.h>
 #include <proto/connection.h>
-#include <proto/port_range.h>
+#include <haproxy/port_range.h>
 #include <haproxy/protocol.h>
 #include <proto/queue.h>
 #include <proto/sample.h>