There is a minimum base that all our sources will end up needing. This
is what <nft.h> provides.
Add <stdbool.h> and <stdint.h> there. It's unlikely that we want to
implement anything, without having "bool" and "uint32_t" types
available.
Yes, this means the internal headers are not self-contained, with
respect to what <nft.h> provides. This is the exception to the rule, and
our internal headers should rely to have <nft.h> included for them.
They should not include <nft.h> themselves, because <nft.h> needs always
be included as first. So when an internal header would include <nft.h>
it would be unnecessary, because the header is *always* included
already.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
24 files changed:
#ifndef NFTABLES_DATATYPE_H
#define NFTABLES_DATATYPE_H
-#include <stdbool.h>
#include <json.h>
/**
#define NFTABLES_DCCPOPT_H
#include <nftables.h>
-#include <stdint.h>
#define DCCPOPT_TYPE_MIN 0
#define DCCPOPT_TYPE_MAX UINT8_MAX
#ifndef NFTABLES_EXPRESSION_H
#define NFTABLES_EXPRESSION_H
-#include <stdbool.h>
#include <gmputil.h>
#include <linux/netfilter/nf_tables.h>
#include <config.h>
+#include <stdbool.h>
+#include <stdint.h>
+
#endif /* NFTABLES_NFT_H */
#ifndef NFTABLES_NFTABLES_H
#define NFTABLES_NFTABLES_H
-#include <stdbool.h>
#include <stdarg.h>
#include <limits.h>
#include <utils.h>
#ifndef NFTABLES_RULE_H
#define NFTABLES_RULE_H
-#include <stdint.h>
#include <nftables.h>
#include <list.h>
#include <netinet/in.h>
#define NFTABLES_UTILS_H
#include <asm/byteorder.h>
-#include <stdint.h>
-#include <stdbool.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <nft.h>
#include <stddef.h>
-#include <stdint.h>
#include <datatype.h>
#include <dccpopt.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <arpa/inet.h>
#include <linux/netfilter.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <nft.h>
-#include <stdint.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <nft.h>
-#include <stdint.h>
#include <expression.h>
#include <gmputil.h>
#include <list.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <nft.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <linux/netfilter/nf_tables.h>
#include <netdb.h>
#include <string.h>
-#include <stdint.h>
/* Buffer size used for getprotobynumber_r() and similar. The manual comments
* that a buffer of 1024 should be sufficient "for most applications"(??), so
#ifndef NFTUTILS_H
#define NFTUTILS_H
-#include <stdbool.h>
#include <stddef.h>
/* The maximum buffer size for (struct protoent).p_name. It is excessively large,
#include <nft.h>
#include <errno.h>
-#include <stdint.h> /* needed by gmputil.h */
#include <string.h>
#include <syslog.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <net/if_arp.h>
#include <arpa/inet.h>
#include <stddef.h>
#include <stdlib.h>
-#include <stdint.h>
#include <string.h>
#include <net/if_arp.h>
#include <arpa/inet.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <arpa/inet.h>
#include <linux/netfilter.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <inttypes.h>
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <syslog.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdint.h>
#include <string.h>
#include <netinet/in.h>
#include <netinet/ip6.h>