From f81e8dbc74186f34faa5ae2b0fe8bdc3f18114ae Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 9 Apr 2009 12:35:13 +0000 Subject: *: make "pragma GCC visibility push(hidden)" less ugly --- networking/udhcp/common.h | 13 ++++--------- networking/udhcp/dhcpc.h | 13 ++++--------- networking/udhcp/dhcpd.h | 13 ++++--------- networking/udhcp/options.h | 12 ++++-------- 4 files changed, 16 insertions(+), 35 deletions(-) (limited to 'networking/udhcp') 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 #include -#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 -- cgit v1.2.3