summaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-09 12:35:13 +0000
committerDenis Vlasenko2009-04-09 12:35:13 +0000
commitf81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae (patch)
tree91ee95914c2b9a07817bd6f596fc3df758651147 /networking/libiproute
parent327fd47f362843fc62fbee6169904c416ca13d11 (diff)
downloadbusybox-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.zip
busybox-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.gz
*: make "pragma GCC visibility push(hidden)" less ugly
Diffstat (limited to 'networking/libiproute')
-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
6 files changed, 29 insertions, 56 deletions
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