diff options
Diffstat (limited to 'libbb/getopt32.c')
-rw-r--r-- | libbb/getopt32.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 03fca3493..b87b83538 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -128,7 +128,7 @@ const char *opt_complementary | |||
128 | "abc" If groups of two or more chars are specified, the first char | 128 | "abc" If groups of two or more chars are specified, the first char |
129 | is the main option and the other chars are secondary options. | 129 | is the main option and the other chars are secondary options. |
130 | Their flags will be turned on if the main option is found even | 130 | Their flags will be turned on if the main option is found even |
131 | if they are not specifed on the command line. For example: | 131 | if they are not specified on the command line. For example: |
132 | 132 | ||
133 | opt_complementary = "abc"; | 133 | opt_complementary = "abc"; |
134 | flags = getopt32(argv, "abcd") | 134 | flags = getopt32(argv, "abcd") |
@@ -576,13 +576,7 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
576 | * run_nofork_applet() does this, but we might end up here | 576 | * run_nofork_applet() does this, but we might end up here |
577 | * also via gunzip_main() -> gzip_main(). Play safe. | 577 | * also via gunzip_main() -> gzip_main(). Play safe. |
578 | */ | 578 | */ |
579 | #if defined(__GLIBC__) || ENABLE_PLATFORM_MINGW32 | 579 | GETOPT_RESET(); |
580 | optind = 0; | ||
581 | #else /* BSD style */ | ||
582 | optind = 1; | ||
583 | /* optreset = 1; */ | ||
584 | #endif | ||
585 | /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */ | ||
586 | 580 | ||
587 | /* Note: just "getopt() <= 0" will not work well for | 581 | /* Note: just "getopt() <= 0" will not work well for |
588 | * "fake" short options, like this one: | 582 | * "fake" short options, like this one: |