summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/isrv.h8
-rw-r--r--networking/libiproute/ip_common.h14
-rw-r--r--networking/libiproute/libnetlink.h15
-rw-r--r--networking/libiproute/ll_map.h14
-rw-r--r--networking/libiproute/rt_names.h14
-rw-r--r--networking/libiproute/rtm_map.h14
-rw-r--r--networking/libiproute/utils.h14
-rw-r--r--networking/tcpudp_perhost.h8
-rw-r--r--networking/udhcp/common.h13
-rw-r--r--networking/udhcp/dhcpc.h13
-rw-r--r--networking/udhcp/dhcpd.h13
-rw-r--r--networking/udhcp/options.h12
12 files changed, 49 insertions, 103 deletions
diff --git a/networking/isrv.h b/networking/isrv.h
index c0158a3..f20714d 100644
--- a/networking/isrv.h
+++ b/networking/isrv.h
@@ -8,9 +8,7 @@
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
/* opaque structure */
struct isrv_state_t;
@@ -36,6 +34,4 @@ void isrv_run(
int linger_timeout
);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h
index 305b491..aef3252 100644
--- a/networking/libiproute/ip_common.h
+++ b/networking/libiproute/ip_common.h
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
-#ifndef _IP_COMMON_H
-#define _IP_COMMON_H 1
+#ifndef IP_COMMON_H
+#define IP_COMMON_H 1
#include "libbb.h"
#include <asm/types.h>
@@ -13,9 +13,7 @@
#include <linux/if_link.h>
#endif
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
extern char **ip_parse_common_args(char **argv);
extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
@@ -34,8 +32,6 @@ extern int do_ipmonitor(char **argv);
extern int do_multiaddr(char **argv);
extern int do_multiroute(char **argv);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
-#endif /* ip_common.h */
+#endif
diff --git a/networking/libiproute/libnetlink.h b/networking/libiproute/libnetlink.h
index 079153b..e5fee4d 100644
--- a/networking/libiproute/libnetlink.h
+++ b/networking/libiproute/libnetlink.h
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
-#ifndef __LIBNETLINK_H__
-#define __LIBNETLINK_H__ 1
+#ifndef LIBNETLINK_H
+#define LIBNETLINK_H 1
#include <linux/types.h>
/* We need linux/types.h because older kernels use __u32 etc
@@ -8,10 +8,7 @@
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
struct rtnl_handle
{
@@ -48,8 +45,6 @@ extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, i
extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC;
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
-#endif /* __LIBNETLINK_H__ */
+#endif
diff --git a/networking/libiproute/ll_map.h b/networking/libiproute/ll_map.h
index 6d64ac1..3966def 100644
--- a/networking/libiproute/ll_map.h
+++ b/networking/libiproute/ll_map.h
@@ -1,10 +1,8 @@
/* vi: set sw=4 ts=4: */
-#ifndef __LL_MAP_H__
-#define __LL_MAP_H__ 1
+#ifndef LL_MAP_H
+#define LL_MAP_H 1
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg);
int ll_init_map(struct rtnl_handle *rth);
@@ -14,8 +12,6 @@ const char *ll_idx_n2a(int idx, char *buf);
/* int ll_index_to_type(int idx); */
unsigned ll_index_to_flags(int idx);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
-#endif /* __LL_MAP_H__ */
+#endif
diff --git a/networking/libiproute/rt_names.h b/networking/libiproute/rt_names.h
index 3d68b67..a2d4fd1 100644
--- a/networking/libiproute/rt_names.h
+++ b/networking/libiproute/rt_names.h
@@ -1,10 +1,8 @@
/* vi: set sw=4 ts=4: */
-#ifndef RT_NAMES_H_
-#define RT_NAMES_H_ 1
+#ifndef RT_NAMES_H
+#define RT_NAMES_H 1
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
extern const char* rtnl_rtprot_n2a(int id, char *buf, int len);
extern const char* rtnl_rtscope_n2a(int id, char *buf, int len);
@@ -17,19 +15,15 @@ extern int rtnl_rtrealm_a2n(uint32_t *id, char *arg);
extern int rtnl_dsfield_a2n(uint32_t *id, char *arg);
extern int rtnl_rttable_a2n(uint32_t *id, char *arg);
-
extern const char* ll_type_n2a(int type, char *buf, int len);
extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type,
char *buf, int blen);
extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg);
-
extern const char* ll_proto_n2a(unsigned short id, char *buf, int len);
extern int ll_proto_a2n(unsigned short *id, char *buf);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
#endif
diff --git a/networking/libiproute/rtm_map.h b/networking/libiproute/rtm_map.h
index 02fa77e..ab1b70e 100644
--- a/networking/libiproute/rtm_map.h
+++ b/networking/libiproute/rtm_map.h
@@ -1,18 +1,14 @@
/* vi: set sw=4 ts=4: */
-#ifndef __RTM_MAP_H__
-#define __RTM_MAP_H__ 1
+#ifndef RTM_MAP_H
+#define RTM_MAP_H 1
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
const char *rtnl_rtntype_n2a(int id, char *buf, int len);
int rtnl_rtntype_a2n(int *id, char *arg);
int get_rt_realms(uint32_t *realms, char *arg);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
-#endif /* __RTM_MAP_H__ */
+#endif
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h
index 3603c75..ed03e78 100644
--- a/networking/libiproute/utils.h
+++ b/networking/libiproute/utils.h
@@ -1,14 +1,12 @@
/* vi: set sw=4 ts=4: */
-#ifndef __UTILS_H__
-#define __UTILS_H__ 1
+#ifndef UTILS_H
+#define UTILS_H 1
#include "libnetlink.h"
#include "ll_map.h"
#include "rtm_map.h"
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
extern family_t preferred_family;
extern smallint show_stats; /* UNUSED */
@@ -87,8 +85,6 @@ int dnet_pton(int af, const char *src, void *addr);
const char *ipx_ntop(int af, const void *addr, char *str, size_t len);
int ipx_pton(int af, const char *src, void *addr);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
-#endif /* __UTILS_H__ */
+#endif
diff --git a/networking/tcpudp_perhost.h b/networking/tcpudp_perhost.h
index 2e093c1..d370036 100644
--- a/networking/tcpudp_perhost.h
+++ b/networking/tcpudp_perhost.h
@@ -7,9 +7,7 @@
* Licensed under GPLv2, see file LICENSE in this tarball for details.
*/
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
struct hcc {
char *ip;
@@ -32,6 +30,4 @@ void ipsvd_perhost_remove(int pid);
//unsigned ipsvd_perhost_setpid(int pid);
//void ipsvd_perhost_free(void);
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h
index 15f0d9a..5a258c0 100644
--- a/networking/udhcp/common.h
+++ b/networking/udhcp/common.h
@@ -6,17 +6,14 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-
-#ifndef _COMMON_H
-#define _COMMON_H
+#ifndef UDHCP_COMMON_H
+#define UDHCP_COMMON_H 1
#include "libbb.h"
#include <netinet/udp.h>
#include <netinet/ip.h>
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
#define DEFAULT_SCRIPT CONFIG_UDHCPC_DEFAULT_SCRIPT
@@ -103,8 +100,6 @@ int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *i
# define DEBUG(str, args...) do {;} while (0)
#endif
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
#endif
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h
index a934849..7b77942 100644
--- a/networking/udhcp/dhcpc.h
+++ b/networking/udhcp/dhcpc.h
@@ -1,12 +1,9 @@
/* vi: set sw=4 ts=4: */
/* dhcpc.h */
+#ifndef UDHCP_DHCPC_H
+#define UDHCP_DHCPC_H 1
-#ifndef _DHCPC_H
-#define _DHCPC_H
-
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
struct client_config_t {
uint8_t arp[6]; /* Our arp address */
@@ -49,8 +46,6 @@ int send_release(uint32_t server, uint32_t ciaddr) FAST_FUNC;
int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) FAST_FUNC;
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
#endif
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h
index b4e1808..9667c61 100644
--- a/networking/udhcp/dhcpd.h
+++ b/networking/udhcp/dhcpd.h
@@ -1,12 +1,9 @@
/* vi: set sw=4 ts=4: */
/* dhcpd.h */
+#ifndef UDHCP_DHCPD_H
+#define UDHCP_DHCPD_H 1
-#ifndef _DHCPD_H
-#define _DHCPD_H
-
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
/************************************/
/* Defaults _you_ may want to tweak */
@@ -134,8 +131,6 @@ void read_leases(const char *file) FAST_FUNC;
struct option_set *find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC;
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
#endif
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h
index 87440c3..23370da 100644
--- a/networking/udhcp/options.h
+++ b/networking/udhcp/options.h
@@ -1,11 +1,9 @@
/* vi: set sw=4 ts=4: */
/* options.h */
-#ifndef _OPTIONS_H
-#define _OPTIONS_H
+#ifndef UDHCP_OPTIONS_H
+#define UDHCP_OPTIONS_H 1
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility push(hidden)
-#endif
+PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
#define TYPE_MASK 0x0F
@@ -111,8 +109,6 @@ char *dname_dec(const uint8_t *cstr, int clen, const char *pre) FAST_FUNC;
uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen) FAST_FUNC;
#endif
-#if __GNUC_PREREQ(4,1)
-# pragma GCC visibility pop
-#endif
+POP_SAVED_FUNCTION_VISIBILITY
#endif