aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 12:35:13 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-09 12:35:13 +0000
commitf81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae (patch)
tree91ee95914c2b9a07817bd6f596fc3df758651147 /networking/udhcp
parent327fd47f362843fc62fbee6169904c416ca13d11 (diff)
downloadbusybox-f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae.tar.gz
*: make "pragma GCC visibility push(hidden)" less ugly
Diffstat (limited to 'networking/udhcp')
-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
4 files changed, 16 insertions, 35 deletions
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 @@
*
* 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 a9348497f..7b7794266 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 b4e180882..9667c61e8 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 87440c30c..23370da6e 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