summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-02-10 10:40:15 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-02-10 10:52:06 +0100
commitc02e80878979d2205f3d89d05548397871e598e9 (patch)
treef657af3687de34aa9680816eda93c86c0535bad0
parentb6601f3a4f65d0956dd829b63c503875b10d5c74 (diff)
libxtables: decouple non-xtables parts from header
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--include/ip6tables.h1
-rw-r--r--include/iptables.h1
-rw-r--r--include/iptables/internal.h.in (renamed from include/xtables/internal.h.in)8
-rw-r--r--include/xtables.h.in7
7 files changed, 14 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 116de2c3..97c30045 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,7 +18,7 @@ Makefile.in
/extensions/targets?.man
/include/xtables.h
-/include/xtables/internal.h
+/include/iptables/internal.h
/aclocal.m4
/autom4te*.cache
diff --git a/Makefile.am b/Makefile.am
index 23489762..0e247176 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,7 +105,7 @@ tarball:
tar -C /tmp -cjf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/;
rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION};
-config.status: include/xtables.h.in
+config.status: include/xtables.h.in include/iptables/internal.h.in
# ldconfig may fail when we are not root (as is the case in build systems)
# so add appropriate protection that it does not let `make` fail.
diff --git a/configure.ac b/configure.ac
index bb32130c..888ba429 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,5 +79,5 @@ libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage));
AC_SUBST([libxtables_vmajor])
AC_CONFIG_FILES([Makefile extensions/GNUmakefile libipq/Makefile
- include/xtables.h include/xtables/internal.h xtables.pc])
+ include/xtables.h include/iptables/internal.h xtables.pc])
AC_OUTPUT
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 1956cf06..663da9ca 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -4,6 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libip6tc.h>
+#include <iptables/internal.h>
#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
#define IP6T_SO_GET_REVISION_MATCH 68
diff --git a/include/iptables.h b/include/iptables.h
index f7ae0cc5..ee769a58 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -4,6 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libiptc.h>
+#include <iptables/internal.h>
#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
#define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
diff --git a/include/xtables/internal.h.in b/include/iptables/internal.h.in
index 5e34694a..849e1722 100644
--- a/include/xtables/internal.h.in
+++ b/include/iptables/internal.h.in
@@ -1,5 +1,5 @@
-#ifndef _XTABLES_INTERNAL_H
-#define _XTABLES_INTERNAL_H 1
+#ifndef IPTABLES_INTERNAL_H
+#define IPTABLES_INTERNAL_H 1
#define IPTABLES_VERSION "@PACKAGE_VERSION@"
@@ -8,6 +8,4 @@
*/
extern const char *program_name, *program_version;
-extern void _init(void);
-
-#endif /* _XTABLES_INTERNAL_H */
+#endif /* IPTABLES_INTERNAL_H */
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 02750fb9..1455e9cd 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -258,10 +258,15 @@ extern const struct xtables_pprot xtables_chain_protos[];
extern u_int16_t xtables_parse_protocol(const char *s);
#ifdef XTABLES_INTERNAL
+
+/* Shipped modules rely on this... */
+
# ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
# endif
-# include <xtables/internal.h>
+
+extern void _init(void);
+
#endif
#endif /* _XTABLES_H */