From: Willy Tarreau Date: Wed, 3 Jun 2020 17:20:59 +0000 (+0200) Subject: REORG: include: move port_range.h to haproxy/port_range{,-t}.h X-Git-Tag: v2.2-dev9~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8f6a8517d3af50c536b84e4cb12cae5c460ec3;p=thirdparty%2Fhaproxy.git 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 0000000000..2841166776 --- /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 +#include + +struct port_range { + int size, get, put_h, put_t; /* range size, and get/put positions */ + uint16_t ports[0]; /* array of 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 c651fa862f..be0160be0b 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 +#include +#include +#include +#include #define GET_NEXT_OFF(range, off) ((off) == (range)->size - 1 ? 0 : (off) + 1) @@ -91,7 +94,7 @@ static inline struct port_range *port_range_alloc_range(int n) 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 3f72855d5f..55f136f78c 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/include/types/fd.h b/include/types/fd.h index 505291f9a2..66fab44dea 100644 --- a/include/types/fd.h +++ b/include/types/fd.h @@ -24,7 +24,7 @@ #include #include -#include +#include /* 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 33455d2dd1..0000000000 --- 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 - -struct port_range { - int size, get, put_h, put_t; /* range size, and get/put positions */ - uint16_t ports[0]; /* array of 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 cd1649b17f..499bc51607 100644 --- a/src/checks.c +++ b/src/checks.c @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/fd.c b/src/fd.c index c7bc54efaf..56a0b7b40e 100644 --- a/src/fd.c +++ b/src/fd.c @@ -93,7 +93,7 @@ #include #include -#include +#include 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 b9aa82400c..2abfd85337 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/server.c b/src/server.c index 324dc97dda..5c26de3b74 100644 --- a/src/server.c +++ b/src/server.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include