From: Jim Meyering Date: Sat, 1 May 1999 02:28:54 +0000 (+0000) Subject: (main): Manually handle `--', since we no longer X-Git-Tag: SH-UTILS-1_16h~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=910287474f91e35ae4b9a477cccad83a5e041c3c;p=thirdparty%2Fcoreutils.git (main): Manually handle `--', since we no longer call getopt. Reported by Joseph S. Myers. --- diff --git a/src/dirname.c b/src/dirname.c index 73231986d6..fa584381c9 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -73,6 +73,13 @@ main (int argc, char **argv) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, AUTHORS, usage); + /* The above handles --help and --version. + Since there is no other invocation of getopt, handle `--' here. */ + if (argc > 1 && STREQ (argv[1], "--")) + { + --argc; + ++argv; + } if (argc != 2) {