From: Willy Tarreau Date: Thu, 4 Jun 2020 14:06:59 +0000 (+0200) Subject: REORG: include: move protocol_buffers.h to haproxy/protobuf{,-t}.h X-Git-Tag: v2.2-dev9~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b23e5958edee5fc823820b79a271669842728391;p=thirdparty%2Fhaproxy.git REORG: include: move protocol_buffers.h to haproxy/protobuf{,-t}.h There is no C file for this one, the code was placed into sample.c which thus has a dependency on this file which itself includes sample.h. Probably that it would be wise to split that later. --- diff --git a/include/haproxy/arg-t.h b/include/haproxy/arg-t.h index 1a4208d4e9..d63d60f4e8 100644 --- a/include/haproxy/arg-t.h +++ b/include/haproxy/arg-t.h @@ -27,9 +27,9 @@ #include #include +#include #include -#include #include /* encoding of each arg type : up to 31 types are supported */ diff --git a/include/types/protocol_buffers.h b/include/haproxy/protobuf-t.h similarity index 93% rename from include/types/protocol_buffers.h rename to include/haproxy/protobuf-t.h index 35e8444ccf..b1a14e7014 100644 --- a/include/types/protocol_buffers.h +++ b/include/haproxy/protobuf-t.h @@ -1,5 +1,5 @@ /* - * include/types/protocol_buffers.h + * include/haproxy/protobuf-t.h * This file contains structure declarations for protocol buffers. * * Copyright 2012 Willy Tarreau @@ -19,8 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _TYPES_PROTOCOL_BUFFERS_H -#define _TYPES_PROTOCOL_BUFFERS_H +#ifndef _HAPROXY_PROTOBUF_T_H +#define _HAPROXY_PROTOBUF_T_H + +#include enum protobuf_wire_type { PBUF_TYPE_VARINT, @@ -75,7 +77,7 @@ struct protobuf_parser_def { unsigned char *pos, size_t left, size_t vlen); }; -#endif /* _TYPES_PROTOCOL_BUFFERS_H */ +#endif /* _HAPROXY_PROTOBUF_T_H */ /* * Local variables: diff --git a/include/proto/protocol_buffers.h b/include/haproxy/protobuf.h similarity index 98% rename from include/proto/protocol_buffers.h rename to include/haproxy/protobuf.h index 16ccee5775..7f46543e32 100644 --- a/include/proto/protocol_buffers.h +++ b/include/haproxy/protobuf.h @@ -1,5 +1,5 @@ /* - * include/proto/protocol_buffers.h + * include/haproxy/protobuf.h * This file contains functions and macros declarations for protocol buffers decoding. * * Copyright 2012 Willy Tarreau @@ -19,13 +19,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PROTO_PROTOCOL_BUFFERS_H -#define _PROTO_PROTOCOL_BUFFERS_H +#ifndef _HAPROXY_PROTOBUF_H +#define _HAPROXY_PROTOBUF_H -#include +#include #include +#include #include -#include #define PBUF_VARINT_DONT_STOP_BIT 7 #define PBUF_VARINT_DONT_STOP_BITMASK (1 << PBUF_VARINT_DONT_STOP_BIT) @@ -567,7 +567,7 @@ static inline int protobuf_field_lookup(const struct arg *arg_p, struct sample * return 0; } -#endif /* _PROTO_PROTOCOL_BUFFERS_H */ +#endif /* _HAPROXY_PROTOBUF_H */ /* * Local variables: diff --git a/src/sample.c b/src/sample.c index 871db000f2..8ee3407c2f 100644 --- a/src/sample.c +++ b/src/sample.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include