From: Willy Tarreau Date: Fri, 5 Jun 2020 13:37:34 +0000 (+0200) Subject: CLEANUP: include: don't include stddef.h directly X-Git-Tag: v2.2-dev9~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d62af6abe4fa9abf215b8ee9025a565ad14c5179;p=thirdparty%2Fhaproxy.git CLEANUP: include: don't include stddef.h directly Directly including stddef.h in many files results in it being processed multiple times while it can be centralized in api-t.h and be guarded against multiple inclusions. Doing so reduces the number of preprocessed lines by 1200! --- diff --git a/include/haproxy/base64.h b/include/haproxy/base64.h index d7dec58cde..1756bc058f 100644 --- a/include/haproxy/base64.h +++ b/include/haproxy/base64.h @@ -14,7 +14,7 @@ #ifndef _HAPROXY_BASE64_H #define _HAPROXY_BASE64_H -#include +#include int a2base64(char *in, int ilen, char *out, int olen); int base64dec(const char *in, size_t ilen, char *out, size_t olen); diff --git a/include/haproxy/buf-t.h b/include/haproxy/buf-t.h index cb4310da09..3c0f8b551a 100644 --- a/include/haproxy/buf-t.h +++ b/include/haproxy/buf-t.h @@ -28,7 +28,7 @@ #ifndef _HAPROXY_BUF_T_H #define _HAPROXY_BUF_T_H -#include +#include /* Structure defining a buffer's head */ struct buffer { diff --git a/include/haproxy/http.h b/include/haproxy/http.h index 64ac4bcece..1bd9da9adb 100644 --- a/include/haproxy/http.h +++ b/include/haproxy/http.h @@ -23,9 +23,9 @@ #ifndef _HAPROXY_HTTP_H #define _HAPROXY_HTTP_H -#include #include #include +#include #include extern const int http_err_codes[HTTP_ERR_SIZE]; diff --git a/include/haproxy/namespace-t.h b/include/haproxy/namespace-t.h index 3a9733644e..b86ae31a5f 100644 --- a/include/haproxy/namespace-t.h +++ b/include/haproxy/namespace-t.h @@ -23,8 +23,8 @@ #ifndef _HAPROXY_NAMESPACE_T_H #define _HAPROXY_NAMESPACE_T_H -#include #include +#include /* the struct is just empty if namespaces are not supported */ struct netns_entry