summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko2007-10-11 10:05:36 +0000
committerDenis Vlasenko2007-10-11 10:05:36 +0000
commit9b49a5ed8551e46892af3f676e5d96d21b540e3c (patch)
tree3d177ef7f3f5e8338690718c86012203ef29a7da /networking
parent8d82cf72c99a8ab8bdbb0b179a1f1135a004c47a (diff)
downloadbusybox-9b49a5ed8551e46892af3f676e5d96d21b540e3c.zip
busybox-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 8cdee18..36985fc 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 a2c4c22..44615d5 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 c906de3..8f01d5c 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 fc26ad0..b752152 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 58847a9..587f000 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 6783dba..2c224be 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 06a5a56..6118502 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 0d53676..3dcb118 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 bd53f93..c4d7252 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 6d72e13..9ea7f9c 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 c82d731..3ea1b62 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 7597043..d7c968c 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 9bc3b60..a93de12 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 2114516..0369c08 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 19750e5..b2f590a 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 ab82465..cbc0a64 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 e5ed10e..11f1419 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 fab7e3e..183ae15 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 5d61cd7..8b70d9a 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 5ae3e61..d18f8db 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 55a6c21..3425e63 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 ce6d705..17df4fa 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 ae526fa..9085c58 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 b219912..27dde1a 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 59f53ae..a268397 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 e8d486f..773fc6a 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 21b496c..e00379b 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 4343f1c..9679e08 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 91fcb15..42378d6 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 3e931c0..218e6bc 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 8bd8870..7b6c2fa 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 3f9954c..b12d19a 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 62350c6..a16a642 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;