diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-19 12:10:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-19 12:10:38 +0200 |
commit | f3b92d385695aecefd93d5f199be1f64270c2687 (patch) | |
tree | 5d6b2308ceafea6040bd78ea8401a91eb65d376b /libbb | |
parent | e2e4cc249dc1bd4b280846f55a36208674eadd55 (diff) | |
download | busybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.tar.gz busybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.tar.bz2 busybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.zip |
getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/getopt32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 1eb868c97..17b8dd1a4 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -314,7 +314,7 @@ typedef struct { | |||
314 | } t_complementary; | 314 | } t_complementary; |
315 | 315 | ||
316 | /* You can set applet_long_options for parse called long options */ | 316 | /* You can set applet_long_options for parse called long options */ |
317 | #if ENABLE_GETOPT_LONG | 317 | #if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG |
318 | static const struct option bb_null_long_options[1] = { | 318 | static const struct option bb_null_long_options[1] = { |
319 | { 0, 0, 0, 0 } | 319 | { 0, 0, 0, 0 } |
320 | }; | 320 | }; |
@@ -335,7 +335,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
335 | const unsigned char *s; | 335 | const unsigned char *s; |
336 | t_complementary *on_off; | 336 | t_complementary *on_off; |
337 | va_list p; | 337 | va_list p; |
338 | #if ENABLE_GETOPT_LONG | 338 | #if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG |
339 | const struct option *l_o; | 339 | const struct option *l_o; |
340 | struct option *long_options = (struct option *) &bb_null_long_options; | 340 | struct option *long_options = (struct option *) &bb_null_long_options; |
341 | #endif | 341 | #endif |
@@ -384,7 +384,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
384 | c++; | 384 | c++; |
385 | } | 385 | } |
386 | 386 | ||
387 | #if ENABLE_GETOPT_LONG | 387 | #if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG |
388 | if (applet_long_options) { | 388 | if (applet_long_options) { |
389 | const char *optstr; | 389 | const char *optstr; |
390 | unsigned i, count; | 390 | unsigned i, count; |
@@ -424,7 +424,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
424 | next_long: ; | 424 | next_long: ; |
425 | } | 425 | } |
426 | } | 426 | } |
427 | #endif /* ENABLE_GETOPT_LONG */ | 427 | #endif /* ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG */ |
428 | for (s = (const unsigned char *)opt_complementary; s && *s; s++) { | 428 | for (s = (const unsigned char *)opt_complementary; s && *s; s++) { |
429 | t_complementary *pair; | 429 | t_complementary *pair; |
430 | unsigned *pair_switch; | 430 | unsigned *pair_switch; |
@@ -543,7 +543,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
543 | * "fake" short options, like this one: | 543 | * "fake" short options, like this one: |
544 | * wget $'-\203' "Test: test" http://kernel.org/ | 544 | * wget $'-\203' "Test: test" http://kernel.org/ |
545 | * (supposed to act as --header, but doesn't) */ | 545 | * (supposed to act as --header, but doesn't) */ |
546 | #if ENABLE_GETOPT_LONG | 546 | #if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG |
547 | while ((c = getopt_long(argc, argv, applet_opts, | 547 | while ((c = getopt_long(argc, argv, applet_opts, |
548 | long_options, NULL)) != -1) { | 548 | long_options, NULL)) != -1) { |
549 | #else | 549 | #else |