diff options
author | Jim Meyering <jim@meyering.net> | 1999-05-01 02:28:54 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-05-01 02:28:54 +0000 |
commit | 910287474f91e35ae4b9a477cccad83a5e041c3c (patch) | |
tree | 2974f24a257dec7459e51d2305c678377dc6acf0 /src | |
parent | 6faa50c13511e585536af3f37d6df11a789b796a (diff) | |
download | coreutils-910287474f91e35ae4b9a477cccad83a5e041c3c.tar.xz |
(main): Manually handle `--', since we no longer
call getopt. Reported by Joseph S. Myers.
Diffstat (limited to 'src')
-rw-r--r-- | src/dirname.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dirname.c b/src/dirname.c index 73231986d..fa584381c 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) { |