aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:05:36 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-11 10:05:36 +0000
commit9b49a5ed8551e46892af3f676e5d96d21b540e3c (patch)
tree3d177ef7f3f5e8338690718c86012203ef29a7da /networking
parent8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a (diff)
downloadbusybox-9b49a5ed8551e46892af3f676e5d96d21b540e3c.tar.gz
add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
Diffstat (limited to 'networking')
-rw-r--r--networking/arp.c2
-rw-r--r--networking/arping.c2
-rw-r--r--networking/dnsd.c2
-rw-r--r--networking/ether-wake.c2
-rw-r--r--networking/ftpgetput.c2
-rw-r--r--networking/hostname.c2
-rw-r--r--networking/httpd.c2
-rw-r--r--networking/ifconfig.c2
-rw-r--r--networking/ifupdown.c2
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/ip.c12
-rw-r--r--networking/ipcalc.c2
-rw-r--r--networking/isrv_identd.c2
-rw-r--r--networking/nameif.c2
-rw-r--r--networking/nc.c2
-rw-r--r--networking/nc_bloaty.c2
-rw-r--r--networking/netstat.c2
-rw-r--r--networking/nslookup.c2
-rw-r--r--networking/ping.c6
-rw-r--r--networking/pscan.c2
-rw-r--r--networking/route.c2
-rw-r--r--networking/slattach.c2
-rw-r--r--networking/telnet.c4
-rw-r--r--networking/telnetd.c2
-rw-r--r--networking/tftp.c2
-rw-r--r--networking/traceroute.c2
-rw-r--r--networking/udhcp/dhcpc.c2
-rw-r--r--networking/udhcp/dhcpd.c2
-rw-r--r--networking/udhcp/dhcprelay.c2
-rw-r--r--networking/udhcp/dumpleases.c2
-rw-r--r--networking/vconfig.c2
-rw-r--r--networking/wget.c2
-rw-r--r--networking/zcip.c2
33 files changed, 41 insertions, 41 deletions
diff --git a/networking/arp.c b/networking/arp.c
index 8cdee1832..36985fc5a 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -434,7 +434,7 @@ static int arp_show(char *name)
return 0;
}
-int arp_main(int argc, char **argv);
+int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int arp_main(int argc, char **argv)
{
char *hw_type;
diff --git a/networking/arping.c b/networking/arping.c
index a2c4c2247..44615d5b1 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -227,7 +227,7 @@ static int recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
return 1;
}
-int arping_main(int argc, char **argv);
+int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int arping_main(int argc, char **argv)
{
const char *device = "eth0";
diff --git a/networking/dnsd.c b/networking/dnsd.c
index c906de32a..8f01d5c06 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -328,7 +328,7 @@ static void interrupt(int x)
exit(2);
}
-int dnsd_main(int argc, char **argv);
+int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dnsd_main(int argc, char **argv)
{
const char *listen_interface = "0.0.0.0";
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index fc26ad07d..b752152e1 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -178,7 +178,7 @@ static int get_wol_pw(const char *ethoptarg, unsigned char *wol_passwd)
return byte_cnt;
}
-int ether_wake_main(int argc, char **argv);
+int ether_wake_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ether_wake_main(int argc, char **argv)
{
const char *ifname = "eth0";
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 58847a9f2..587f000ce 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -296,7 +296,7 @@ static const char ftpgetput_longopts[] ALIGN1 =
;
#endif
-int ftpgetput_main(int argc, char **argv);
+int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ftpgetput_main(int argc, char **argv)
{
/* content-length of the file */
diff --git a/networking/hostname.c b/networking/hostname.c
index 6783dbacb..2c224bef9 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -42,7 +42,7 @@ static void do_sethostname(char *s, int isfile)
}
}
-int hostname_main(int argc, char **argv);
+int hostname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int hostname_main(int argc, char **argv)
{
enum {
diff --git a/networking/httpd.c b/networking/httpd.c
index 06a5a56bc..61185025c 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2111,7 +2111,7 @@ enum {
};
-int httpd_main(int argc, char **argv);
+int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int httpd_main(int argc, char **argv)
{
int server_socket = server_socket; /* for gcc */
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index 0d53676cd..3dcb118ee 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -261,7 +261,7 @@ static int in_ether(const char *bufp, struct sockaddr *sap);
* Our main function.
*/
-int ifconfig_main(int argc, char **argv);
+int ifconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ifconfig_main(int argc, char **argv)
{
struct ifreq ifr;
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index bd53f93e8..c4d72524d 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1133,7 +1133,7 @@ static llist_t *read_iface_state(void)
}
-int ifupdown_main(int argc, char **argv);
+int ifupdown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ifupdown_main(int argc, char **argv)
{
int (*cmds)(struct interface_defn_t *) = NULL;
diff --git a/networking/inetd.c b/networking/inetd.c
index 6d72e13e8..9ea7f9cc1 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1303,7 +1303,7 @@ inetd_setproctitle(char *a, int s)
#endif
-int inetd_main(int argc, char **argv);
+int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int inetd_main(int argc, char **argv)
{
servtab_t *sep;
diff --git a/networking/ip.c b/networking/ip.c
index c82d731c1..3ea1b62e1 100644
--- a/networking/ip.c
+++ b/networking/ip.c
@@ -38,7 +38,7 @@ static int ip_do(int argc, char **argv)
}
#if ENABLE_FEATURE_IP_ADDRESS
-int ipaddr_main(int argc, char **argv);
+int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipaddr_main(int argc, char **argv)
{
ip_func = do_ipaddr;
@@ -46,7 +46,7 @@ int ipaddr_main(int argc, char **argv)
}
#endif
#if ENABLE_FEATURE_IP_LINK
-int iplink_main(int argc, char **argv);
+int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iplink_main(int argc, char **argv)
{
ip_func = do_iplink;
@@ -54,7 +54,7 @@ int iplink_main(int argc, char **argv)
}
#endif
#if ENABLE_FEATURE_IP_ROUTE
-int iproute_main(int argc, char **argv);
+int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iproute_main(int argc, char **argv)
{
ip_func = do_iproute;
@@ -62,7 +62,7 @@ int iproute_main(int argc, char **argv)
}
#endif
#if ENABLE_FEATURE_IP_RULE
-int iprule_main(int argc, char **argv);
+int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iprule_main(int argc, char **argv)
{
ip_func = do_iprule;
@@ -70,7 +70,7 @@ int iprule_main(int argc, char **argv)
}
#endif
#if ENABLE_FEATURE_IP_TUNNEL
-int iptunnel_main(int argc, char **argv);
+int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int iptunnel_main(int argc, char **argv)
{
ip_func = do_iptunnel;
@@ -79,7 +79,7 @@ int iptunnel_main(int argc, char **argv)
#endif
-int ip_main(int argc, char **argv);
+int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ip_main(int argc, char **argv)
{
static const char keywords[] ALIGN1 =
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index 759704379..d7c968c25 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -75,7 +75,7 @@ int get_prefix(unsigned long netmask);
;
#endif
-int ipcalc_main(int argc, char **argv);
+int ipcalc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ipcalc_main(int argc, char **argv)
{
unsigned opt;
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index 9bc3b607d..a93de1244 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -92,7 +92,7 @@ static void inetd_mode(void)
while (do_rd(0, (void*)&buf) == 0);
}
-int fakeidentd_main(int argc, char **argv);
+int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int fakeidentd_main(int argc, char **argv)
{
enum {
diff --git a/networking/nameif.c b/networking/nameif.c
index 2114516a7..0369c0807 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -55,7 +55,7 @@ static struct ether_addr *cc_macaddr(const char *str_macaddr)
return mac;
}
-int nameif_main(int argc, char **argv);
+int nameif_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nameif_main(int argc, char **argv)
{
mactable_t *clist = NULL;
diff --git a/networking/nc.c b/networking/nc.c
index 19750e59e..b2f590adf 100644
--- a/networking/nc.c
+++ b/networking/nc.c
@@ -22,7 +22,7 @@ static void timeout(int signum)
bb_error_msg_and_die("timed out");
}
-int nc_main(int argc, char **argv);
+int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nc_main(int argc, char **argv)
{
/* sfd sits _here_ only because of "repeat" option (-l -l). */
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index ab8246531..cbc0a6471 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -668,7 +668,7 @@ Debug("wrote %d to net, errno %d", rr, errno);
} /* readwrite */
/* main: now we pull it all together... */
-int nc_main(int argc, char **argv);
+int nc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nc_main(int argc, char **argv)
{
char *str_p, *str_s, *str_w;
diff --git a/networking/netstat.c b/networking/netstat.c
index e5ed10eb4..11f141947 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -484,7 +484,7 @@ static void do_info(const char *file, const char *name, void (*proc)(int, const
* Our main function.
*/
-int netstat_main(int argc, char **argv);
+int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int netstat_main(int argc, char **argv)
{
const char *net_conn_line_header = PRINT_NET_CONN_HEADER;
diff --git a/networking/nslookup.c b/networking/nslookup.c
index fab7e3efc..183ae152d 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -127,7 +127,7 @@ static void set_default_dns(char *server)
}
}
-int nslookup_main(int argc, char **argv);
+int nslookup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nslookup_main(int argc, char **argv)
{
/* We allow 1 or 2 arguments.
diff --git a/networking/ping.c b/networking/ping.c
index 5d61cd768..8b70d9a33 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -173,7 +173,7 @@ static void ping6(len_and_sockaddr *lsa)
}
#endif
-int ping_main(int argc, char **argv);
+int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping_main(int argc, char **argv)
{
len_and_sockaddr *lsa;
@@ -676,7 +676,7 @@ static void ping(len_and_sockaddr *lsa)
ping4(lsa);
}
-int ping_main(int argc, char **argv);
+int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping_main(int argc, char **argv)
{
len_and_sockaddr *lsa;
@@ -724,7 +724,7 @@ int ping_main(int argc, char **argv)
#if ENABLE_PING6
-int ping6_main(int argc, char **argv);
+int ping6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int ping6_main(int argc, char **argv)
{
argv[0] = (char*)"-6";
diff --git a/networking/pscan.c b/networking/pscan.c
index 5ae3e61dd..d18f8dbd9 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -30,7 +30,7 @@ static const char *port_name(unsigned port)
/* We don't expect to see 1000+ seconds delay, unsigned is enough */
#define MONOTONIC_US() ((unsigned)monotonic_us())
-int pscan_main(int argc, char **argv);
+int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int pscan_main(int argc, char **argv)
{
const char *opt_max_port = "1024"; /* -P: default max port */
diff --git a/networking/route.c b/networking/route.c
index 55a6c2155..3425e6397 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -640,7 +640,7 @@ static const char tbl_verb[] ALIGN1 =
"\010\002delete" /* Since it's last, we can save a byte. */
;
-int route_main(int argc, char **argv);
+int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int route_main(int argc, char **argv)
{
unsigned opt;
diff --git a/networking/slattach.c b/networking/slattach.c
index ce6d705a8..17df4fa9e 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -119,7 +119,7 @@ static void sig_handler(int signo)
restore_state_and_exit(0);
}
-int slattach_main(int argc, char **argv);
+int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int slattach_main(int argc, char **argv)
{
/* Line discipline code table */
diff --git a/networking/telnet.c b/networking/telnet.c
index ae526fa9e..9085c5848 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -550,8 +550,8 @@ static void cookmode(void)
tcsetattr(0, TCSADRAIN, &G.termios_def);
}
-int telnet_main(int argc, char** argv);
-int telnet_main(int argc, char** argv)
+int telnet_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int telnet_main(int argc, char **argv)
{
char *host;
int port;
diff --git a/networking/telnetd.c b/networking/telnetd.c
index b21991212..27dde1ae4 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -360,7 +360,7 @@ void free_session(struct tsession *ts);
#endif
-int telnetd_main(int argc, char **argv);
+int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int telnetd_main(int argc, char **argv)
{
fd_set rdfdset, wrfdset;
diff --git a/networking/tftp.c b/networking/tftp.c
index 59f53ae4a..a2683971a 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -391,7 +391,7 @@ static int tftp( USE_GETPUT(const int cmd,)
return finished == 0; /* returns 1 on failure */
}
-int tftp_main(int argc, char **argv);
+int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tftp_main(int argc, char **argv)
{
len_and_sockaddr *peer_lsa;
diff --git a/networking/traceroute.c b/networking/traceroute.c
index e8d486f4c..773fc6a8b 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -889,7 +889,7 @@ print_delta_ms(unsigned t1p, unsigned t2p)
printf(" %u.%03u ms", tt/1000, tt%1000);
}
-int traceroute_main(int argc, char **argv);
+int traceroute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int traceroute_main(int argc, char **argv)
{
int code, n;
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 21b496c0b..e00379b2a 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -140,7 +140,7 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra)
}
-int udhcpc_main(int argc, char **argv);
+int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int udhcpc_main(int argc, char **argv)
{
uint8_t *temp, *message;
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 4343f1c0e..9679e086c 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -21,7 +21,7 @@ struct dhcpOfferedAddr *leases;
/* struct server_config_t server_config is in bb_common_bufsiz1 */
-int udhcpd_main(int argc, char **argv);
+int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int udhcpd_main(int argc, char **argv)
{
fd_set rfds;
diff --git a/networking/udhcp/dhcprelay.c b/networking/udhcp/dhcprelay.c
index 91fcb151b..42378d602 100644
--- a/networking/udhcp/dhcprelay.c
+++ b/networking/udhcp/dhcprelay.c
@@ -279,7 +279,7 @@ static void dhcprelay_loop(int *fds, int num_sockets, int max_socket, char **cli
}
}
-int dhcprelay_main(int argc, char **argv);
+int dhcprelay_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dhcprelay_main(int argc, char **argv)
{
int num_sockets, max_socket;
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index 3e931c0b5..218e6bc57 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -7,7 +7,7 @@
#include "common.h"
#include "dhcpd.h"
-int dumpleases_main(int argc, char **argv);
+int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int dumpleases_main(int argc, char **argv)
{
int fd;
diff --git a/networking/vconfig.c b/networking/vconfig.c
index 8bd88701f..7b6c2fa04 100644
--- a/networking/vconfig.c
+++ b/networking/vconfig.c
@@ -106,7 +106,7 @@ static const char name_types[] ALIGN1 = {
static const char conf_file_name[] ALIGN1 = "/proc/net/vlan/config";
-int vconfig_main(int argc, char **argv);
+int vconfig_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int vconfig_main(int argc, char **argv)
{
struct vlan_ioctl_args ifr;
diff --git a/networking/wget.c b/networking/wget.c
index 3f9954cf5..b12d19af2 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -391,7 +391,7 @@ static char *gethdr(char *buf, size_t bufsiz, FILE *fp /*, int *istrunc*/)
}
-int wget_main(int argc, char **argv);
+int wget_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int wget_main(int argc, char **argv)
{
char buf[512];
diff --git a/networking/zcip.c b/networking/zcip.c
index 62350c640..a16a6420c 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -156,7 +156,7 @@ static unsigned ALWAYS_INLINE ms_rdelay(unsigned secs)
/**
* main program
*/
-int zcip_main(int argc, char **argv);
+int zcip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int zcip_main(int argc, char **argv)
{
int state = PROBE;