svn commit: trunk/busybox/networking

aldot at busybox.net aldot at busybox.net
Wed May 31 14:11:39 UTC 2006


Author: aldot
Date: 2006-05-31 07:11:38 -0700 (Wed, 31 May 2006)
New Revision: 15247

Log:
- add CONFIG_FEATURE_WGET_LONG_OPTIONS


Modified:
   trunk/busybox/networking/Config.in
   trunk/busybox/networking/wget.c


Changeset:
Modified: trunk/busybox/networking/Config.in
===================================================================
--- trunk/busybox/networking/Config.in	2006-05-31 13:31:16 UTC (rev 15246)
+++ trunk/busybox/networking/Config.in	2006-05-31 14:11:38 UTC (rev 15247)
@@ -683,6 +683,13 @@
 	help
 	  Support IPv6 address literal notation in URLs.
 
+config CONFIG_FEATURE_WGET_LONG_OPTIONS
+	bool "Enable long options"
+	default n
+	depends on CONFIG_WGET && CONFIG_GETOPT_LONG
+	help
+	  Support long options for the wget applet.
+
 config CONFIG_ZCIP
 	bool "zcip"
 	default n

Modified: trunk/busybox/networking/wget.c
===================================================================
--- trunk/busybox/networking/wget.c	2006-05-31 13:31:16 UTC (rev 15246)
+++ trunk/busybox/networking/wget.c	2006-05-31 14:11:38 UTC (rev 15247)
@@ -147,6 +147,7 @@
 #define WGET_OPT_PREFIX	32
 #define WGET_OPT_PROXY	64
 
+#if ENABLE_WGET_LONG_OPTIONS
 static const struct option wget_long_options[] = {
 	{ "continue",        0, NULL, 'c' },
 	{ "quiet",           0, NULL, 'q' },
@@ -157,6 +158,7 @@
 	{ "proxy",           1, NULL, 'Y' },
 	{ 0,                 0, 0, 0 }
 };
+#endif
 
 int wget_main(int argc, char **argv)
 {
@@ -189,7 +191,9 @@
 	 * Crack command line.
 	 */
 	bb_opt_complementally = "-1:\203::";
+#if ENABLE_WGET_LONG_OPTIONS
 	bb_applet_long_options = wget_long_options;
+#endif
 	opt = bb_getopt_ulflags(argc, argv, "cq\213O:\203:P:Y:",
 					&fname_out, &headers_llist,
 					&dir_prefix, &proxy_flag);




More information about the busybox-cvs mailing list