libxtables: Hide xtables_strtoul_base() symbol
Phil Sutter
reviewerPATCH 1/1 libxtables: Hide xtables_strtoul_base() symbol
In reply to a message not in the archiveThere are no external users, no need to promote it in xtables.h.
Fixes 1af6984c57cce ("libxtables: Introduce xtables_strtoul_base()")
Signed-off-by Phil Sutter <[email protected]>
--- include/Makefile.am | 2 +- include/xtables.h | 2 -- include/xtables_internal.h | 7 +++++++ libxtables/xtables.c | 1 + libxtables/xtoptions.c | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 include/xtables_internal.h
include/Makefile.am +1 -1
@@ -11,7 +11,7 @@ nobase_include_HEADERS = \ libiptc/ipt_kernel_headers.h libiptc/libiptc.h \ libiptc/libip6tc.h libiptc/libxtc.h libiptc/xtcshared.h -EXTRA_DIST = iptables linux iptables.h ip6tables.h +EXTRA_DIST = iptables linux iptables.h ip6tables.h xtables_internal.h uninstall-hook: dir=${includedir}/libiptc; { \
include/xtables.h +0 -2
@@ -491,8 +491,6 @@ extern void xtables_register_matches(struct xtables_match *, unsigned int);extern void xtables_register_target (struct xtables_target *me);extern void xtables_register_targets (struct xtables_target *,unsigned int ); -extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, -uintmax_t ,uintmax_t ,unsigned int );extern bool xtables_strtoul (const char *,char **,uintmax_t *,uintmax_t ,uintmax_t ); extern bool xtables_strtoui(const char *, char **, unsigned int *,
include/xtables_internal.h new file +7 -0
@@ -0,0 +1,7 @@ +#ifndef XTABLES_INTERNAL_H +#define XTABLES_INTERNAL_H 1 + +extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, +uintmax_t ,uintmax_t ,unsigned int ); + +#endif /* XTABLES_INTERNAL_H */
libxtables/xtables.c +1 -0
@@ -64,6 +64,7 @@#endif #include <getopt.h> #include "iptables/internal.h" +#include "xtables_internal.h" #define NPROTO 255
libxtables/xtoptions.c +1 -0
@@ -21,6 +21,7 @@#include <arpa/inet.h> #include <netinet/ip.h> #include "xtables.h" +#include "xtables_internal.h" #ifndef IPTOS_NORMALSVC # define IPTOS_NORMALSVC 0#endif
Signature · 1 line
2.47.0
Quoted 4 lines · Phil Sutter
There are no external users, no need to promote it in
xtables.h.Fixes 1af6984c57cce ("libxtables: Introduce xtables_strtoul_base()")Signed-off-by Phil Sutter <[email protected]>
Quoted 75 lines
--- include/Makefile.am | 2 +- include/xtables.h | 2 -- include/xtables_internal.h | 7 +++++++ libxtables/xtables.c | 1 + libxtables/xtoptions.c | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 include/xtables_internal.hinclude/Makefile.am +1
-1@@ -11,7 +11,7 @@ nobase_include_HEADERS = \ libiptc/ipt_kernel_headers.h libiptc/libiptc.h \ libiptc/libip6tc.h libiptc/libxtc.h libiptc/xtcshared.h -EXTRA_DIST = iptables linux iptables.h ip6tables.h +EXTRA_DIST = iptables linux iptables.h ip6tables.h xtables_internal.h uninstall-hook: dir=${includedir}/libiptc; { \include/xtables.h +0
-2@@ -491,8 +491,6 @@ extern void xtables_register_matches(struct xtables_match *, unsigned int);extern void xtables_register_target (struct xtables_target *me);extern void xtables_register_targets (struct xtables_target *,unsigned int ); -extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, -uintmax_t ,uintmax_t ,unsigned int );extern bool xtables_strtoul (const char *,char **,uintmax_t *,uintmax_t ,uintmax_t ); extern bool xtables_strtoui(const char *, char **, unsigned int *,include/xtables_internal.h new file +7
-0@@ -0,0 +1,7 @@ +#ifndef XTABLES_INTERNAL_H +#define XTABLES_INTERNAL_H 1 + +extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, +uintmax_t ,uintmax_t ,unsigned int ); + +#endif /* XTABLES_INTERNAL_H */ libxtables/xtables.c +1
-0@@ -64,6 +64,7 @@#endif #include <getopt.h> #include "iptables/internal.h" +#include "xtables_internal.h" #define NPROTO 255libxtables/xtoptions.c +1
-0@@ -21,6 +21,7 @@#include <arpa/inet.h> #include <netinet/ip.h> #include "xtables.h" +#include "xtables_internal.h" #ifndef IPTOS_NORMALSVC # define IPTOS_NORMALSVC 0#endif Signature · 1 line
2.47.0
Phil Sutter
reviewerQuoted 7 lines · Pablo Neira Ayuso
Quoted 4 lines · Phil Sutter
There are no external users, no need to promote it in
xtables.h.Fixes 1af6984c57cce ("libxtables: Introduce xtables_strtoul_base()")Signed-off-by Phil Sutter <[email protected]>
Patch applied, thanks!
Phil Sutter
reviewerQuoted 18 lines · Jan Engelhardt
include/xtables_internal.h line 7
Quoted 13 lines · Phil Sutter
include/xtables_internal.h new file +7
-0@@ -0,0 +1,7 @@ +#ifndef XTABLES_INTERNAL_H +#define XTABLES_INTERNAL_H 1 + +extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, +uintmax_t ,uintmax_t ,unsigned int ); + +#endif /* XTABLES_INTERNAL_H */ Don't we already have
xshared.hfor this?
That's iptables/xshared.h and it's not included outside of that subfolder.
include/xtables_internal.h line 7
Quoted 13 lines · Phil Sutter
include/xtables_internal.h new file +7
-0@@ -0,0 +1,7 @@ +#ifndef XTABLES_INTERNAL_H +#define XTABLES_INTERNAL_H 1 + +extern bool xtables_strtoul_base (const char *,char **,uintmax_t *, +uintmax_t ,uintmax_t ,unsigned int ); + +#endif /* XTABLES_INTERNAL_H */
Don't we already have xshared.h for this?