aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-31 14:11:38 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2006-05-31 14:11:38 +0000
commit8d3a6f7aaf04b09d185652f87cb924702e700c51 (patch)
tree2467b26e6a970a751258b8b4aa048d84e262bbb1
parentf3ac9ebc8e4744bdb98955e682e46dab8509bed9 (diff)
downloadbusybox-w32-8d3a6f7aaf04b09d185652f87cb924702e700c51.tar.gz
busybox-w32-8d3a6f7aaf04b09d185652f87cb924702e700c51.tar.bz2
busybox-w32-8d3a6f7aaf04b09d185652f87cb924702e700c51.zip
- add CONFIG_FEATURE_WGET_LONG_OPTIONS
-rw-r--r--networking/Config.in7
-rw-r--r--networking/wget.c4
2 files changed, 11 insertions, 0 deletions
diff --git a/networking/Config.in b/networking/Config.in
index c718af0e9..fe3233e35 100644
--- a/networking/Config.in
+++ b/networking/Config.in
@@ -683,6 +683,13 @@ config CONFIG_FEATURE_WGET_IP6_LITERAL
683 help 683 help
684 Support IPv6 address literal notation in URLs. 684 Support IPv6 address literal notation in URLs.
685 685
686config CONFIG_FEATURE_WGET_LONG_OPTIONS
687 bool "Enable long options"
688 default n
689 depends on CONFIG_WGET && CONFIG_GETOPT_LONG
690 help
691 Support long options for the wget applet.
692
686config CONFIG_ZCIP 693config CONFIG_ZCIP
687 bool "zcip" 694 bool "zcip"
688 default n 695 default n
diff --git a/networking/wget.c b/networking/wget.c
index fdcc68df3..6cab1ba46 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -147,6 +147,7 @@ static char *base64enc(unsigned char *p, char *buf, int len) {
147#define WGET_OPT_PREFIX 32 147#define WGET_OPT_PREFIX 32
148#define WGET_OPT_PROXY 64 148#define WGET_OPT_PROXY 64
149 149
150#if ENABLE_WGET_LONG_OPTIONS
150static const struct option wget_long_options[] = { 151static const struct option wget_long_options[] = {
151 { "continue", 0, NULL, 'c' }, 152 { "continue", 0, NULL, 'c' },
152 { "quiet", 0, NULL, 'q' }, 153 { "quiet", 0, NULL, 'q' },
@@ -157,6 +158,7 @@ static const struct option wget_long_options[] = {
157 { "proxy", 1, NULL, 'Y' }, 158 { "proxy", 1, NULL, 'Y' },
158 { 0, 0, 0, 0 } 159 { 0, 0, 0, 0 }
159}; 160};
161#endif
160 162
161int wget_main(int argc, char **argv) 163int wget_main(int argc, char **argv)
162{ 164{
@@ -189,7 +191,9 @@ int wget_main(int argc, char **argv)
189 * Crack command line. 191 * Crack command line.
190 */ 192 */
191 bb_opt_complementally = "-1:\203::"; 193 bb_opt_complementally = "-1:\203::";
194#if ENABLE_WGET_LONG_OPTIONS
192 bb_applet_long_options = wget_long_options; 195 bb_applet_long_options = wget_long_options;
196#endif
193 opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:", 197 opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:",
194 &fname_out, &headers_llist, 198 &fname_out, &headers_llist,
195 &dir_prefix, &proxy_flag); 199 &dir_prefix, &proxy_flag);