diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-03 21:00:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-03 21:00:06 +0000 |
commit | 67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 (patch) | |
tree | edb58560b444979051b42ab7f0c0c718f7459754 /networking | |
parent | 40920825d59874cf285390434486e88c8498d2d8 (diff) | |
download | busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.gz busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.bz2 busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.zip |
getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arping.c | 6 | ||||
-rw-r--r-- | networking/dnsd.c | 2 | ||||
-rw-r--r-- | networking/ether-wake.c | 2 | ||||
-rw-r--r-- | networking/fakeidentd.c | 2 | ||||
-rw-r--r-- | networking/ftpgetput.c | 6 | ||||
-rw-r--r-- | networking/hostname.c | 4 | ||||
-rw-r--r-- | networking/httpd.c | 4 | ||||
-rw-r--r-- | networking/ifupdown.c | 2 | ||||
-rw-r--r-- | networking/inetd.c | 2 | ||||
-rw-r--r-- | networking/ipcalc.c | 4 | ||||
-rw-r--r-- | networking/nameif.c | 2 | ||||
-rw-r--r-- | networking/netstat.c | 6 | ||||
-rw-r--r-- | networking/route.c | 4 | ||||
-rw-r--r-- | networking/telnet.c | 2 | ||||
-rw-r--r-- | networking/telnetd.c | 4 | ||||
-rw-r--r-- | networking/tftp.c | 6 | ||||
-rw-r--r-- | networking/traceroute.c | 6 | ||||
-rw-r--r-- | networking/wget.c | 8 | ||||
-rw-r--r-- | networking/zcip.c | 6 |
19 files changed, 39 insertions, 39 deletions
diff --git a/networking/arping.c b/networking/arping.c index f84c8a75c..1ff6f90be 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -265,14 +265,14 @@ int arping_main(int argc, char **argv) | |||
265 | xsetuid(getuid()); | 265 | xsetuid(getuid()); |
266 | 266 | ||
267 | { | 267 | { |
268 | unsigned long opt; | 268 | unsigned opt; |
269 | char *_count, *_timeout; | 269 | char *_count, *_timeout; |
270 | 270 | ||
271 | /* Dad also sets quit_on_reply. | 271 | /* Dad also sets quit_on_reply. |
272 | * Advert also sets unsolicited. | 272 | * Advert also sets unsolicited. |
273 | */ | 273 | */ |
274 | bb_opt_complementally = "Df:AU"; | 274 | opt_complementary = "Df:AU"; |
275 | opt = bb_getopt_ulflags(argc, argv, "DUAqfbc:w:i:s:", | 275 | opt = getopt32(argc, argv, "DUAqfbc:w:i:s:", |
276 | &_count, &_timeout, &device, &source); | 276 | &_count, &_timeout, &device, &source); |
277 | cfg |= opt & 0x3f; /* set respective flags */ | 277 | cfg |= opt & 0x3f; /* set respective flags */ |
278 | if (opt & 0x40) /* -c: count */ | 278 | if (opt & 0x40) /* -c: count */ |
diff --git a/networking/dnsd.c b/networking/dnsd.c index b0e74d770..ab3704707 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -372,7 +372,7 @@ int dnsd_main(int argc, char **argv) | |||
372 | char *sttl=NULL, *sport=NULL; | 372 | char *sttl=NULL, *sport=NULL; |
373 | 373 | ||
374 | if(argc > 1) | 374 | if(argc > 1) |
375 | flags = bb_getopt_ulflags(argc, argv, "i:c:t:p:dv", &listen_interface, &fileconf, &sttl, &sport); | 375 | flags = getopt32(argc, argv, "i:c:t:p:dv", &listen_interface, &fileconf, &sttl, &sport); |
376 | if(sttl) | 376 | if(sttl) |
377 | if(!(ttl = atol(sttl))) | 377 | if(!(ttl = atol(sttl))) |
378 | bb_show_usage(); | 378 | bb_show_usage(); |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index f4ca889fa..294a9dd3c 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -120,7 +120,7 @@ int ether_wake_main(int argc, char *argv[]) | |||
120 | struct whereto_t whereto; /* who to wake up */ | 120 | struct whereto_t whereto; /* who to wake up */ |
121 | 121 | ||
122 | /* handle misc user options */ | 122 | /* handle misc user options */ |
123 | flags = bb_getopt_ulflags(argc, argv, "bi:p:", &ifname, &pass); | 123 | flags = getopt32(argc, argv, "bi:p:", &ifname, &pass); |
124 | if (optind == argc) | 124 | if (optind == argc) |
125 | bb_show_usage(); | 125 | bb_show_usage(); |
126 | if (pass) | 126 | if (pass) |
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index 2d690edba..6070e5f2d 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c | |||
@@ -228,7 +228,7 @@ int fakeidentd_main(int argc, char **argv) | |||
228 | FD_SET(0, &G.readfds); | 228 | FD_SET(0, &G.readfds); |
229 | 229 | ||
230 | /* handle -b <ip> parameter */ | 230 | /* handle -b <ip> parameter */ |
231 | bb_getopt_ulflags(argc, argv, "b:", &bind_ip_address); | 231 | getopt32(argc, argv, "b:", &bind_ip_address); |
232 | /* handle optional REPLY STRING */ | 232 | /* handle optional REPLY STRING */ |
233 | if (optind < argc) | 233 | if (optind < argc) |
234 | G.identuser = argv[optind]; | 234 | G.identuser = argv[optind]; |
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index 453cce571..25b7f1427 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c | |||
@@ -275,7 +275,7 @@ static const struct option ftpgetput_long_options[] = { | |||
275 | int ftpgetput_main(int argc, char **argv) | 275 | int ftpgetput_main(int argc, char **argv) |
276 | { | 276 | { |
277 | /* content-length of the file */ | 277 | /* content-length of the file */ |
278 | unsigned long opt; | 278 | unsigned opt; |
279 | char *port = "ftp"; | 279 | char *port = "ftp"; |
280 | 280 | ||
281 | /* socket to ftp server */ | 281 | /* socket to ftp server */ |
@@ -305,9 +305,9 @@ int ftpgetput_main(int argc, char **argv) | |||
305 | * Decipher the command line | 305 | * Decipher the command line |
306 | */ | 306 | */ |
307 | if (ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS) | 307 | if (ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS) |
308 | bb_applet_long_options = ftpgetput_long_options; | 308 | applet_long_options = ftpgetput_long_options; |
309 | 309 | ||
310 | opt = bb_getopt_ulflags(argc, argv, "cvu:p:P:", &server->user, &server->password, &port); | 310 | opt = getopt32(argc, argv, "cvu:p:P:", &server->user, &server->password, &port); |
311 | 311 | ||
312 | /* Process the non-option command line arguments */ | 312 | /* Process the non-option command line arguments */ |
313 | if (argc - optind != 3) { | 313 | if (argc - optind != 3) { |
diff --git a/networking/hostname.c b/networking/hostname.c index 2850bd5bd..4fe28d740 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -55,13 +55,13 @@ int hostname_main(int argc, char **argv) | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | char buf[256]; | 57 | char buf[256]; |
58 | unsigned long opt; | 58 | unsigned opt; |
59 | char *hostname_str = NULL; | 59 | char *hostname_str = NULL; |
60 | 60 | ||
61 | if (argc < 1) | 61 | if (argc < 1) |
62 | bb_show_usage(); | 62 | bb_show_usage(); |
63 | 63 | ||
64 | opt = bb_getopt_ulflags(argc, argv, "dfisF:", &hostname_str); | 64 | opt = getopt32(argc, argv, "dfisF:", &hostname_str); |
65 | 65 | ||
66 | /* Output in desired format */ | 66 | /* Output in desired format */ |
67 | if (opt & OPT_dfis) { | 67 | if (opt & OPT_dfis) { |
diff --git a/networking/httpd.c b/networking/httpd.c index e533594f2..ac9eac6bf 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1909,7 +1909,7 @@ static const char httpd_opts[] = "c:d:h:" | |||
1909 | 1909 | ||
1910 | int httpd_main(int argc, char *argv[]) | 1910 | int httpd_main(int argc, char *argv[]) |
1911 | { | 1911 | { |
1912 | unsigned long opt; | 1912 | unsigned opt; |
1913 | const char *home_httpd = home; | 1913 | const char *home_httpd = home; |
1914 | char *url_for_decode; | 1914 | char *url_for_decode; |
1915 | USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) | 1915 | USE_FEATURE_HTTPD_ENCODE_URL_STR(const char *url_for_encode;) |
@@ -1932,7 +1932,7 @@ int httpd_main(int argc, char *argv[]) | |||
1932 | 1932 | ||
1933 | config->ContentLength = -1; | 1933 | config->ContentLength = -1; |
1934 | 1934 | ||
1935 | opt = bb_getopt_ulflags(argc, argv, httpd_opts, | 1935 | opt = getopt32(argc, argv, httpd_opts, |
1936 | &(config->configFile), &url_for_decode, &home_httpd | 1936 | &(config->configFile), &url_for_decode, &home_httpd |
1937 | USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) | 1937 | USE_FEATURE_HTTPD_ENCODE_URL_STR(, &url_for_encode) |
1938 | USE_FEATURE_HTTPD_BASIC_AUTH(, &(config->realm)) | 1938 | USE_FEATURE_HTTPD_BASIC_AUTH(, &(config->realm)) |
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 9dd1c9926..f34287580 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -1088,7 +1088,7 @@ int ifupdown_main(int argc, char **argv) | |||
1088 | cmds = iface_down; | 1088 | cmds = iface_down; |
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | option_mask = bb_getopt_ulflags(argc, argv, OPTION_STR, &interfaces); | 1091 | option_mask = getopt32(argc, argv, OPTION_STR, &interfaces); |
1092 | if (argc - optind > 0) { | 1092 | if (argc - optind > 0) { |
1093 | if (DO_ALL) bb_show_usage(); | 1093 | if (DO_ALL) bb_show_usage(); |
1094 | } else | 1094 | } else |
diff --git a/networking/inetd.c b/networking/inetd.c index 8c8843b9b..350f91dc4 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -1253,7 +1253,7 @@ inetd_main(int argc, char *argv[]) | |||
1253 | 1253 | ||
1254 | openlog(bb_applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON); | 1254 | openlog(bb_applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON); |
1255 | 1255 | ||
1256 | opt = bb_getopt_ulflags(argc, argv, "R:f", &stoomany); | 1256 | opt = getopt32(argc, argv, "R:f", &stoomany); |
1257 | if(opt & 1) { | 1257 | if(opt & 1) { |
1258 | char *e; | 1258 | char *e; |
1259 | 1259 | ||
diff --git a/networking/ipcalc.c b/networking/ipcalc.c index aafb7869b..576dfc853 100644 --- a/networking/ipcalc.c +++ b/networking/ipcalc.c | |||
@@ -90,9 +90,9 @@ int ipcalc_main(int argc, char **argv) | |||
90 | char *ipstr; | 90 | char *ipstr; |
91 | 91 | ||
92 | if (ENABLE_FEATURE_IPCALC_LONG_OPTIONS) | 92 | if (ENABLE_FEATURE_IPCALC_LONG_OPTIONS) |
93 | bb_applet_long_options = long_options; | 93 | applet_long_options = long_options; |
94 | 94 | ||
95 | mode = bb_getopt_ulflags(argc, argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs")); | 95 | mode = getopt32(argc, argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs")); |
96 | 96 | ||
97 | argc -= optind; | 97 | argc -= optind; |
98 | argv += optind; | 98 | argv += optind; |
diff --git a/networking/nameif.c b/networking/nameif.c index 3fa257263..146eccea9 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -65,7 +65,7 @@ int nameif_main(int argc, char **argv) | |||
65 | int if_index = 1; | 65 | int if_index = 1; |
66 | mactable_t *ch; | 66 | mactable_t *ch; |
67 | 67 | ||
68 | if (1 & bb_getopt_ulflags(argc, argv, "sc:", &fname)) { | 68 | if (1 & getopt32(argc, argv, "sc:", &fname)) { |
69 | openlog(bb_applet_name, 0, LOG_LOCAL0); | 69 | openlog(bb_applet_name, 0, LOG_LOCAL0); |
70 | logmode = LOGMODE_SYSLOG; | 70 | logmode = LOGMODE_SYSLOG; |
71 | } | 71 | } |
diff --git a/networking/netstat.c b/networking/netstat.c index cadcb0e31..bc5c61974 100644 --- a/networking/netstat.c +++ b/networking/netstat.c | |||
@@ -21,7 +21,7 @@ extern void displayroutes(int noresolve, int netstatfmt); | |||
21 | #define NETSTAT_CONNECTED 0x01 | 21 | #define NETSTAT_CONNECTED 0x01 |
22 | #define NETSTAT_LISTENING 0x02 | 22 | #define NETSTAT_LISTENING 0x02 |
23 | #define NETSTAT_NUMERIC 0x04 | 23 | #define NETSTAT_NUMERIC 0x04 |
24 | /* Must match getopt_ulflags option string */ | 24 | /* Must match getopt32 option string */ |
25 | #define NETSTAT_TCP 0x10 | 25 | #define NETSTAT_TCP 0x10 |
26 | #define NETSTAT_UDP 0x20 | 26 | #define NETSTAT_UDP 0x20 |
27 | #define NETSTAT_RAW 0x40 | 27 | #define NETSTAT_RAW 0x40 |
@@ -526,7 +526,7 @@ int netstat_main(int argc, char **argv) | |||
526 | OPT_extended = 0x4, | 526 | OPT_extended = 0x4, |
527 | OPT_showroute = 0x100, | 527 | OPT_showroute = 0x100, |
528 | }; | 528 | }; |
529 | unsigned long opt; | 529 | unsigned opt; |
530 | #ifdef CONFIG_FEATURE_IPV6 | 530 | #ifdef CONFIG_FEATURE_IPV6 |
531 | int inet = 1; | 531 | int inet = 1; |
532 | int inet6 = 1; | 532 | int inet6 = 1; |
@@ -536,7 +536,7 @@ int netstat_main(int argc, char **argv) | |||
536 | #endif | 536 | #endif |
537 | 537 | ||
538 | /* Option string must match NETSTAT_xxx constants */ | 538 | /* Option string must match NETSTAT_xxx constants */ |
539 | opt = bb_getopt_ulflags(argc, argv, "laentuwxr"); | 539 | opt = getopt32(argc, argv, "laentuwxr"); |
540 | if (opt & 0x1) { // -l | 540 | if (opt & 0x1) { // -l |
541 | flags &= ~NETSTAT_CONNECTED; | 541 | flags &= ~NETSTAT_CONNECTED; |
542 | flags |= NETSTAT_LISTENING; | 542 | flags |= NETSTAT_LISTENING; |
diff --git a/networking/route.c b/networking/route.c index 5fd888617..2e6e017b6 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -647,7 +647,7 @@ static const char tbl_verb[] = /* 2nd byte matches RTACTION_* code */ | |||
647 | 647 | ||
648 | int route_main(int argc, char **argv) | 648 | int route_main(int argc, char **argv) |
649 | { | 649 | { |
650 | unsigned long opt; | 650 | unsigned opt; |
651 | int what; | 651 | int what; |
652 | char *family; | 652 | char *family; |
653 | 653 | ||
@@ -662,7 +662,7 @@ int route_main(int argc, char **argv) | |||
662 | } | 662 | } |
663 | } | 663 | } |
664 | 664 | ||
665 | opt = bb_getopt_ulflags(argc, argv, "A:ne", &family); | 665 | opt = getopt32(argc, argv, "A:ne", &family); |
666 | 666 | ||
667 | if ((opt & ROUTE_OPT_A) && strcmp(family, "inet")) { | 667 | if ((opt & ROUTE_OPT_A) && strcmp(family, "inet")) { |
668 | #ifdef CONFIG_FEATURE_IPV6 | 668 | #ifdef CONFIG_FEATURE_IPV6 |
diff --git a/networking/telnet.c b/networking/telnet.c index fd0f84d50..cd4c33a86 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -623,7 +623,7 @@ int telnet_main(int argc, char** argv) | |||
623 | bb_show_usage(); | 623 | bb_show_usage(); |
624 | 624 | ||
625 | #ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN | 625 | #ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN |
626 | if (1 & bb_getopt_ulflags(argc, argv, "al:", &autologin)) | 626 | if (1 & getopt32(argc, argv, "al:", &autologin)) |
627 | autologin = getenv("USER"); | 627 | autologin = getenv("USER"); |
628 | 628 | ||
629 | if (optind < argc) { | 629 | if (optind < argc) { |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 9fa8faf66..808d4be51 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -362,7 +362,7 @@ free_session(struct tsession *ts) | |||
362 | int | 362 | int |
363 | telnetd_main(int argc, char **argv) | 363 | telnetd_main(int argc, char **argv) |
364 | { | 364 | { |
365 | unsigned long opt; | 365 | unsigned opt; |
366 | fd_set rdfdset, wrfdset; | 366 | fd_set rdfdset, wrfdset; |
367 | int selret; | 367 | int selret; |
368 | #ifndef CONFIG_FEATURE_TELNETD_INETD | 368 | #ifndef CONFIG_FEATURE_TELNETD_INETD |
@@ -387,7 +387,7 @@ telnetd_main(int argc, char **argv) | |||
387 | openlog(bb_applet_name, 0, LOG_USER); | 387 | openlog(bb_applet_name, 0, LOG_USER); |
388 | logmode = LOGMODE_SYSLOG; | 388 | logmode = LOGMODE_SYSLOG; |
389 | 389 | ||
390 | opt = bb_getopt_ulflags(argc, argv, "f:l:" USE_FEATURE_TELNETD_INETD("p:b:"), | 390 | opt = getopt32(argc, argv, "f:l:" USE_FEATURE_TELNETD_INETD("p:b:"), |
391 | &issuefile, &loginpath | 391 | &issuefile, &loginpath |
392 | SKIP_FEATURE_TELNETD_INETD(, &opt_portnbr, &opt_bindaddr)); | 392 | SKIP_FEATURE_TELNETD_INETD(, &opt_portnbr, &opt_bindaddr)); |
393 | //if (opt & 1) // -f | 393 | //if (opt & 1) // -f |
diff --git a/networking/tftp.c b/networking/tftp.c index 42fd9d2ca..5f0c190e2 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -497,13 +497,13 @@ int tftp_main(int argc, char **argv) | |||
497 | #endif | 497 | #endif |
498 | 498 | ||
499 | #if defined(CONFIG_FEATURE_TFTP_GET) && defined(CONFIG_FEATURE_TFTP_PUT) | 499 | #if defined(CONFIG_FEATURE_TFTP_GET) && defined(CONFIG_FEATURE_TFTP_PUT) |
500 | bb_opt_complementally = GET_COMPL PUT_COMPL ":?g--p:p--g"; | 500 | opt_complementary = GET_COMPL PUT_COMPL ":?g--p:p--g"; |
501 | #elif defined(CONFIG_FEATURE_TFTP_GET) || defined(CONFIG_FEATURE_TFTP_PUT) | 501 | #elif defined(CONFIG_FEATURE_TFTP_GET) || defined(CONFIG_FEATURE_TFTP_PUT) |
502 | bb_opt_complementally = GET_COMPL PUT_COMPL; | 502 | opt_complementary = GET_COMPL PUT_COMPL; |
503 | #endif | 503 | #endif |
504 | 504 | ||
505 | 505 | ||
506 | cmd = bb_getopt_ulflags(argc, argv, GET PUT "l:r:" BS, | 506 | cmd = getopt32(argc, argv, GET PUT "l:r:" BS, |
507 | &localfile, &remotefile BS_ARG); | 507 | &localfile, &remotefile BS_ARG); |
508 | 508 | ||
509 | cmd &= (tftp_cmd_get | tftp_cmd_put); | 509 | cmd &= (tftp_cmd_get | tftp_cmd_put); |
diff --git a/networking/traceroute.c b/networking/traceroute.c index e7e131149..042cbe35a 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c | |||
@@ -949,12 +949,12 @@ traceroute_main(int argc, char *argv[]) | |||
949 | 949 | ||
950 | opterr = 0; | 950 | opterr = 0; |
951 | #ifdef CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE | 951 | #ifdef CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE |
952 | bb_opt_complementally = "x-x:g::"; | 952 | opt_complementary = "x-x:g::"; |
953 | #else | 953 | #else |
954 | bb_opt_complementally = "x-x"; | 954 | opt_complementary = "x-x"; |
955 | #endif | 955 | #endif |
956 | 956 | ||
957 | op = bb_getopt_ulflags(argc, argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:" | 957 | op = getopt32(argc, argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:" |
958 | #define USAGE_OP_DONT_FRAGMNT (1<<0) /* F */ | 958 | #define USAGE_OP_DONT_FRAGMNT (1<<0) /* F */ |
959 | #define USAGE_OP_USE_ICMP (1<<1) /* I */ | 959 | #define USAGE_OP_USE_ICMP (1<<1) /* I */ |
960 | #define USAGE_OP_TTL_FLAG (1<<2) /* l */ | 960 | #define USAGE_OP_TTL_FLAG (1<<2) /* l */ |
diff --git a/networking/wget.c b/networking/wget.c index bbe1bba9a..0054a9876 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -124,7 +124,7 @@ static const struct option wget_long_options[] = { | |||
124 | int wget_main(int argc, char **argv) | 124 | int wget_main(int argc, char **argv) |
125 | { | 125 | { |
126 | int n, try=5, status; | 126 | int n, try=5, status; |
127 | unsigned long opt; | 127 | unsigned opt; |
128 | int port; | 128 | int port; |
129 | char *proxy = 0; | 129 | char *proxy = 0; |
130 | char *dir_prefix=NULL; | 130 | char *dir_prefix=NULL; |
@@ -148,11 +148,11 @@ int wget_main(int argc, char **argv) | |||
148 | /* | 148 | /* |
149 | * Crack command line. | 149 | * Crack command line. |
150 | */ | 150 | */ |
151 | bb_opt_complementally = "-1:\203::"; | 151 | opt_complementary = "-1:\203::"; |
152 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS | 152 | #if ENABLE_FEATURE_WGET_LONG_OPTIONS |
153 | bb_applet_long_options = wget_long_options; | 153 | applet_long_options = wget_long_options; |
154 | #endif | 154 | #endif |
155 | opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:U:", | 155 | opt = getopt32(argc, argv, "cq\213O:\203:P:Y:U:", |
156 | &fname_out, &headers_llist, | 156 | &fname_out, &headers_llist, |
157 | &dir_prefix, &proxy_flag, &user_agent); | 157 | &dir_prefix, &proxy_flag, &user_agent); |
158 | if (strcmp(proxy_flag, "off") == 0) { | 158 | if (strcmp(proxy_flag, "off") == 0) { |
diff --git a/networking/zcip.c b/networking/zcip.c index c6b0d2d80..d9c1adf19 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -75,7 +75,7 @@ enum { | |||
75 | #define VDBG(fmt,args...) \ | 75 | #define VDBG(fmt,args...) \ |
76 | do { } while (0) | 76 | do { } while (0) |
77 | 77 | ||
78 | static unsigned long opts; | 78 | static unsigned opts; |
79 | #define FOREGROUND (opts & 1) | 79 | #define FOREGROUND (opts & 1) |
80 | #define QUIT (opts & 2) | 80 | #define QUIT (opts & 2) |
81 | 81 | ||
@@ -217,8 +217,8 @@ int zcip_main(int argc, char *argv[]) | |||
217 | 217 | ||
218 | // parse commandline: prog [options] ifname script | 218 | // parse commandline: prog [options] ifname script |
219 | char *r_opt; | 219 | char *r_opt; |
220 | bb_opt_complementally = "vv:vf"; // -v accumulates and implies -f | 220 | opt_complementary = "vv:vf"; // -v accumulates and implies -f |
221 | opts = bb_getopt_ulflags(argc, argv, "fqr:v", &r_opt, &verbose); | 221 | opts = getopt32(argc, argv, "fqr:v", &r_opt, &verbose); |
222 | if (!FOREGROUND) { | 222 | if (!FOREGROUND) { |
223 | /* Do it early, before all bb_xx_msg calls */ | 223 | /* Do it early, before all bb_xx_msg calls */ |
224 | logmode = LOGMODE_SYSLOG; | 224 | logmode = LOGMODE_SYSLOG; |