diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-09 12:35:13 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-09 12:35:13 +0000 |
commit | f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae (patch) | |
tree | 91ee95914c2b9a07817bd6f596fc3df758651147 /networking | |
parent | 327fd47f362843fc62fbee6169904c416ca13d11 (diff) | |
download | busybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.gz busybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.bz2 busybox-w32-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.zip |
*: make "pragma GCC visibility push(hidden)" less ugly
Diffstat (limited to 'networking')
-rw-r--r-- | networking/isrv.h | 8 | ||||
-rw-r--r-- | networking/libiproute/ip_common.h | 14 | ||||
-rw-r--r-- | networking/libiproute/libnetlink.h | 15 | ||||
-rw-r--r-- | networking/libiproute/ll_map.h | 14 | ||||
-rw-r--r-- | networking/libiproute/rt_names.h | 14 | ||||
-rw-r--r-- | networking/libiproute/rtm_map.h | 14 | ||||
-rw-r--r-- | networking/libiproute/utils.h | 14 | ||||
-rw-r--r-- | networking/tcpudp_perhost.h | 8 | ||||
-rw-r--r-- | networking/udhcp/common.h | 13 | ||||
-rw-r--r-- | networking/udhcp/dhcpc.h | 13 | ||||
-rw-r--r-- | networking/udhcp/dhcpd.h | 13 | ||||
-rw-r--r-- | networking/udhcp/options.h | 12 |
12 files changed, 49 insertions, 103 deletions
diff --git a/networking/isrv.h b/networking/isrv.h index c0158a3e3..f20714df8 100644 --- a/networking/isrv.h +++ b/networking/isrv.h | |||
@@ -8,9 +8,7 @@ | |||
8 | * Licensed under GPL version 2, see file LICENSE in this tarball for details. | 8 | * Licensed under GPL version 2, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #if __GNUC_PREREQ(4,1) | 11 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
12 | # pragma GCC visibility push(hidden) | ||
13 | #endif | ||
14 | 12 | ||
15 | /* opaque structure */ | 13 | /* opaque structure */ |
16 | struct isrv_state_t; | 14 | struct isrv_state_t; |
@@ -36,6 +34,4 @@ void isrv_run( | |||
36 | int linger_timeout | 34 | int linger_timeout |
37 | ); | 35 | ); |
38 | 36 | ||
39 | #if __GNUC_PREREQ(4,1) | 37 | POP_SAVED_FUNCTION_VISIBILITY |
40 | # pragma GCC visibility pop | ||
41 | #endif | ||
diff --git a/networking/libiproute/ip_common.h b/networking/libiproute/ip_common.h index 305b491c6..aef325281 100644 --- a/networking/libiproute/ip_common.h +++ b/networking/libiproute/ip_common.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef _IP_COMMON_H | 2 | #ifndef IP_COMMON_H |
3 | #define _IP_COMMON_H 1 | 3 | #define IP_COMMON_H 1 |
4 | 4 | ||
5 | #include "libbb.h" | 5 | #include "libbb.h" |
6 | #include <asm/types.h> | 6 | #include <asm/types.h> |
@@ -13,9 +13,7 @@ | |||
13 | #include <linux/if_link.h> | 13 | #include <linux/if_link.h> |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #if __GNUC_PREREQ(4,1) | 16 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
17 | # pragma GCC visibility push(hidden) | ||
18 | #endif | ||
19 | 17 | ||
20 | extern char **ip_parse_common_args(char **argv); | 18 | extern char **ip_parse_common_args(char **argv); |
21 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 19 | extern int print_neigh(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
@@ -34,8 +32,6 @@ extern int do_ipmonitor(char **argv); | |||
34 | extern int do_multiaddr(char **argv); | 32 | extern int do_multiaddr(char **argv); |
35 | extern int do_multiroute(char **argv); | 33 | extern int do_multiroute(char **argv); |
36 | 34 | ||
37 | #if __GNUC_PREREQ(4,1) | 35 | POP_SAVED_FUNCTION_VISIBILITY |
38 | # pragma GCC visibility pop | ||
39 | #endif | ||
40 | 36 | ||
41 | #endif /* ip_common.h */ | 37 | #endif |
diff --git a/networking/libiproute/libnetlink.h b/networking/libiproute/libnetlink.h index 079153b92..e5fee4dd8 100644 --- a/networking/libiproute/libnetlink.h +++ b/networking/libiproute/libnetlink.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef __LIBNETLINK_H__ | 2 | #ifndef LIBNETLINK_H |
3 | #define __LIBNETLINK_H__ 1 | 3 | #define LIBNETLINK_H 1 |
4 | 4 | ||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | /* We need linux/types.h because older kernels use __u32 etc | 6 | /* We need linux/types.h because older kernels use __u32 etc |
@@ -8,10 +8,7 @@ | |||
8 | #include <linux/netlink.h> | 8 | #include <linux/netlink.h> |
9 | #include <linux/rtnetlink.h> | 9 | #include <linux/rtnetlink.h> |
10 | 10 | ||
11 | 11 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |
12 | #if __GNUC_PREREQ(4,1) | ||
13 | # pragma GCC visibility push(hidden) | ||
14 | #endif | ||
15 | 12 | ||
16 | struct rtnl_handle | 13 | struct rtnl_handle |
17 | { | 14 | { |
@@ -48,8 +45,6 @@ extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, i | |||
48 | 45 | ||
49 | extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC; | 46 | extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC; |
50 | 47 | ||
51 | #if __GNUC_PREREQ(4,1) | 48 | POP_SAVED_FUNCTION_VISIBILITY |
52 | # pragma GCC visibility pop | ||
53 | #endif | ||
54 | 49 | ||
55 | #endif /* __LIBNETLINK_H__ */ | 50 | #endif |
diff --git a/networking/libiproute/ll_map.h b/networking/libiproute/ll_map.h index 6d64ac15a..3966def10 100644 --- a/networking/libiproute/ll_map.h +++ b/networking/libiproute/ll_map.h | |||
@@ -1,10 +1,8 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef __LL_MAP_H__ | 2 | #ifndef LL_MAP_H |
3 | #define __LL_MAP_H__ 1 | 3 | #define LL_MAP_H 1 |
4 | 4 | ||
5 | #if __GNUC_PREREQ(4,1) | 5 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
6 | # pragma GCC visibility push(hidden) | ||
7 | #endif | ||
8 | 6 | ||
9 | int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); | 7 | int ll_remember_index(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg); |
10 | int ll_init_map(struct rtnl_handle *rth); | 8 | int ll_init_map(struct rtnl_handle *rth); |
@@ -14,8 +12,6 @@ const char *ll_idx_n2a(int idx, char *buf); | |||
14 | /* int ll_index_to_type(int idx); */ | 12 | /* int ll_index_to_type(int idx); */ |
15 | unsigned ll_index_to_flags(int idx); | 13 | unsigned ll_index_to_flags(int idx); |
16 | 14 | ||
17 | #if __GNUC_PREREQ(4,1) | 15 | POP_SAVED_FUNCTION_VISIBILITY |
18 | # pragma GCC visibility pop | ||
19 | #endif | ||
20 | 16 | ||
21 | #endif /* __LL_MAP_H__ */ | 17 | #endif |
diff --git a/networking/libiproute/rt_names.h b/networking/libiproute/rt_names.h index 3d68b67c8..a2d4fd142 100644 --- a/networking/libiproute/rt_names.h +++ b/networking/libiproute/rt_names.h | |||
@@ -1,10 +1,8 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef RT_NAMES_H_ | 2 | #ifndef RT_NAMES_H |
3 | #define RT_NAMES_H_ 1 | 3 | #define RT_NAMES_H 1 |
4 | 4 | ||
5 | #if __GNUC_PREREQ(4,1) | 5 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
6 | # pragma GCC visibility push(hidden) | ||
7 | #endif | ||
8 | 6 | ||
9 | extern const char* rtnl_rtprot_n2a(int id, char *buf, int len); | 7 | extern const char* rtnl_rtprot_n2a(int id, char *buf, int len); |
10 | extern const char* rtnl_rtscope_n2a(int id, char *buf, int len); | 8 | 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); | |||
17 | extern int rtnl_dsfield_a2n(uint32_t *id, char *arg); | 15 | extern int rtnl_dsfield_a2n(uint32_t *id, char *arg); |
18 | extern int rtnl_rttable_a2n(uint32_t *id, char *arg); | 16 | extern int rtnl_rttable_a2n(uint32_t *id, char *arg); |
19 | 17 | ||
20 | |||
21 | extern const char* ll_type_n2a(int type, char *buf, int len); | 18 | extern const char* ll_type_n2a(int type, char *buf, int len); |
22 | 19 | ||
23 | extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type, | 20 | extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type, |
24 | char *buf, int blen); | 21 | char *buf, int blen); |
25 | extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg); | 22 | extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg); |
26 | 23 | ||
27 | |||
28 | extern const char* ll_proto_n2a(unsigned short id, char *buf, int len); | 24 | extern const char* ll_proto_n2a(unsigned short id, char *buf, int len); |
29 | extern int ll_proto_a2n(unsigned short *id, char *buf); | 25 | extern int ll_proto_a2n(unsigned short *id, char *buf); |
30 | 26 | ||
31 | #if __GNUC_PREREQ(4,1) | 27 | POP_SAVED_FUNCTION_VISIBILITY |
32 | # pragma GCC visibility pop | ||
33 | #endif | ||
34 | 28 | ||
35 | #endif | 29 | #endif |
diff --git a/networking/libiproute/rtm_map.h b/networking/libiproute/rtm_map.h index 02fa77e42..ab1b70e45 100644 --- a/networking/libiproute/rtm_map.h +++ b/networking/libiproute/rtm_map.h | |||
@@ -1,18 +1,14 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef __RTM_MAP_H__ | 2 | #ifndef RTM_MAP_H |
3 | #define __RTM_MAP_H__ 1 | 3 | #define RTM_MAP_H 1 |
4 | 4 | ||
5 | #if __GNUC_PREREQ(4,1) | 5 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
6 | # pragma GCC visibility push(hidden) | ||
7 | #endif | ||
8 | 6 | ||
9 | const char *rtnl_rtntype_n2a(int id, char *buf, int len); | 7 | const char *rtnl_rtntype_n2a(int id, char *buf, int len); |
10 | int rtnl_rtntype_a2n(int *id, char *arg); | 8 | int rtnl_rtntype_a2n(int *id, char *arg); |
11 | 9 | ||
12 | int get_rt_realms(uint32_t *realms, char *arg); | 10 | int get_rt_realms(uint32_t *realms, char *arg); |
13 | 11 | ||
14 | #if __GNUC_PREREQ(4,1) | 12 | POP_SAVED_FUNCTION_VISIBILITY |
15 | # pragma GCC visibility pop | ||
16 | #endif | ||
17 | 13 | ||
18 | #endif /* __RTM_MAP_H__ */ | 14 | #endif |
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index 3603c75a7..ed03e785a 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -1,14 +1,12 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef __UTILS_H__ | 2 | #ifndef UTILS_H |
3 | #define __UTILS_H__ 1 | 3 | #define UTILS_H 1 |
4 | 4 | ||
5 | #include "libnetlink.h" | 5 | #include "libnetlink.h" |
6 | #include "ll_map.h" | 6 | #include "ll_map.h" |
7 | #include "rtm_map.h" | 7 | #include "rtm_map.h" |
8 | 8 | ||
9 | #if __GNUC_PREREQ(4,1) | 9 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
10 | # pragma GCC visibility push(hidden) | ||
11 | #endif | ||
12 | 10 | ||
13 | extern family_t preferred_family; | 11 | extern family_t preferred_family; |
14 | extern smallint show_stats; /* UNUSED */ | 12 | extern smallint show_stats; /* UNUSED */ |
@@ -87,8 +85,6 @@ int dnet_pton(int af, const char *src, void *addr); | |||
87 | const char *ipx_ntop(int af, const void *addr, char *str, size_t len); | 85 | const char *ipx_ntop(int af, const void *addr, char *str, size_t len); |
88 | int ipx_pton(int af, const char *src, void *addr); | 86 | int ipx_pton(int af, const char *src, void *addr); |
89 | 87 | ||
90 | #if __GNUC_PREREQ(4,1) | 88 | POP_SAVED_FUNCTION_VISIBILITY |
91 | # pragma GCC visibility pop | ||
92 | #endif | ||
93 | 89 | ||
94 | #endif /* __UTILS_H__ */ | 90 | #endif |
diff --git a/networking/tcpudp_perhost.h b/networking/tcpudp_perhost.h index 2e093c1c4..d370036a7 100644 --- a/networking/tcpudp_perhost.h +++ b/networking/tcpudp_perhost.h | |||
@@ -7,9 +7,7 @@ | |||
7 | * Licensed under GPLv2, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #if __GNUC_PREREQ(4,1) | 10 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
11 | # pragma GCC visibility push(hidden) | ||
12 | #endif | ||
13 | 11 | ||
14 | struct hcc { | 12 | struct hcc { |
15 | char *ip; | 13 | char *ip; |
@@ -32,6 +30,4 @@ void ipsvd_perhost_remove(int pid); | |||
32 | //unsigned ipsvd_perhost_setpid(int pid); | 30 | //unsigned ipsvd_perhost_setpid(int pid); |
33 | //void ipsvd_perhost_free(void); | 31 | //void ipsvd_perhost_free(void); |
34 | 32 | ||
35 | #if __GNUC_PREREQ(4,1) | 33 | POP_SAVED_FUNCTION_VISIBILITY |
36 | # pragma GCC visibility pop | ||
37 | #endif | ||
diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 15f0d9a54..5a258c064 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h | |||
@@ -6,17 +6,14 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | #ifndef UDHCP_COMMON_H | |
10 | #ifndef _COMMON_H | 10 | #define UDHCP_COMMON_H 1 |
11 | #define _COMMON_H | ||
12 | 11 | ||
13 | #include "libbb.h" | 12 | #include "libbb.h" |
14 | #include <netinet/udp.h> | 13 | #include <netinet/udp.h> |
15 | #include <netinet/ip.h> | 14 | #include <netinet/ip.h> |
16 | 15 | ||
17 | #if __GNUC_PREREQ(4,1) | 16 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
18 | # pragma GCC visibility push(hidden) | ||
19 | #endif | ||
20 | 17 | ||
21 | #define DEFAULT_SCRIPT CONFIG_UDHCPC_DEFAULT_SCRIPT | 18 | #define DEFAULT_SCRIPT CONFIG_UDHCPC_DEFAULT_SCRIPT |
22 | 19 | ||
@@ -103,8 +100,6 @@ int arpping(uint32_t test_ip, uint32_t from_ip, uint8_t *from_mac, const char *i | |||
103 | # define DEBUG(str, args...) do {;} while (0) | 100 | # define DEBUG(str, args...) do {;} while (0) |
104 | #endif | 101 | #endif |
105 | 102 | ||
106 | #if __GNUC_PREREQ(4,1) | 103 | POP_SAVED_FUNCTION_VISIBILITY |
107 | # pragma GCC visibility pop | ||
108 | #endif | ||
109 | 104 | ||
110 | #endif | 105 | #endif |
diff --git a/networking/udhcp/dhcpc.h b/networking/udhcp/dhcpc.h index a9348497f..7b7794266 100644 --- a/networking/udhcp/dhcpc.h +++ b/networking/udhcp/dhcpc.h | |||
@@ -1,12 +1,9 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* dhcpc.h */ | 2 | /* dhcpc.h */ |
3 | #ifndef UDHCP_DHCPC_H | ||
4 | #define UDHCP_DHCPC_H 1 | ||
3 | 5 | ||
4 | #ifndef _DHCPC_H | 6 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
5 | #define _DHCPC_H | ||
6 | |||
7 | #if __GNUC_PREREQ(4,1) | ||
8 | # pragma GCC visibility push(hidden) | ||
9 | #endif | ||
10 | 7 | ||
11 | struct client_config_t { | 8 | struct client_config_t { |
12 | uint8_t arp[6]; /* Our arp address */ | 9 | uint8_t arp[6]; /* Our arp address */ |
@@ -49,8 +46,6 @@ int send_release(uint32_t server, uint32_t ciaddr) FAST_FUNC; | |||
49 | 46 | ||
50 | int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) FAST_FUNC; | 47 | int udhcp_recv_raw_packet(struct dhcpMessage *payload, int fd) FAST_FUNC; |
51 | 48 | ||
52 | #if __GNUC_PREREQ(4,1) | 49 | POP_SAVED_FUNCTION_VISIBILITY |
53 | # pragma GCC visibility pop | ||
54 | #endif | ||
55 | 50 | ||
56 | #endif | 51 | #endif |
diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index b4e180882..9667c61e8 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h | |||
@@ -1,12 +1,9 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* dhcpd.h */ | 2 | /* dhcpd.h */ |
3 | #ifndef UDHCP_DHCPD_H | ||
4 | #define UDHCP_DHCPD_H 1 | ||
3 | 5 | ||
4 | #ifndef _DHCPD_H | 6 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
5 | #define _DHCPD_H | ||
6 | |||
7 | #if __GNUC_PREREQ(4,1) | ||
8 | # pragma GCC visibility push(hidden) | ||
9 | #endif | ||
10 | 7 | ||
11 | /************************************/ | 8 | /************************************/ |
12 | /* Defaults _you_ may want to tweak */ | 9 | /* Defaults _you_ may want to tweak */ |
@@ -134,8 +131,6 @@ void read_leases(const char *file) FAST_FUNC; | |||
134 | struct option_set *find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC; | 131 | struct option_set *find_option(struct option_set *opt_list, uint8_t code) FAST_FUNC; |
135 | 132 | ||
136 | 133 | ||
137 | #if __GNUC_PREREQ(4,1) | 134 | POP_SAVED_FUNCTION_VISIBILITY |
138 | # pragma GCC visibility pop | ||
139 | #endif | ||
140 | 135 | ||
141 | #endif | 136 | #endif |
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h index 87440c30c..23370da6e 100644 --- a/networking/udhcp/options.h +++ b/networking/udhcp/options.h | |||
@@ -1,11 +1,9 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* options.h */ | 2 | /* options.h */ |
3 | #ifndef _OPTIONS_H | 3 | #ifndef UDHCP_OPTIONS_H |
4 | #define _OPTIONS_H | 4 | #define UDHCP_OPTIONS_H 1 |
5 | 5 | ||
6 | #if __GNUC_PREREQ(4,1) | 6 | PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN |
7 | # pragma GCC visibility push(hidden) | ||
8 | #endif | ||
9 | 7 | ||
10 | #define TYPE_MASK 0x0F | 8 | #define TYPE_MASK 0x0F |
11 | 9 | ||
@@ -111,8 +109,6 @@ char *dname_dec(const uint8_t *cstr, int clen, const char *pre) FAST_FUNC; | |||
111 | uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen) FAST_FUNC; | 109 | uint8_t *dname_enc(const uint8_t *cstr, int clen, const char *src, int *retlen) FAST_FUNC; |
112 | #endif | 110 | #endif |
113 | 111 | ||
114 | #if __GNUC_PREREQ(4,1) | 112 | POP_SAVED_FUNCTION_VISIBILITY |
115 | # pragma GCC visibility pop | ||
116 | #endif | ||
117 | 113 | ||
118 | #endif | 114 | #endif |