summaryrefslogtreecommitdiff
path: root/src/yes.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-09-17 13:04:31 +0000
committerJim Meyering <jim@meyering.net>1997-09-17 13:04:31 +0000
commit4d09de4e638e972f43e0f32d725c3b44707eeb21 (patch)
tree6426edcaac90f30e7ae94bc72003bf2f594a9934 /src/yes.c
parent95343e720d51a439c10bc53661f86aa07b310978 (diff)
downloadcoreutils-4d09de4e638e972f43e0f32d725c3b44707eeb21.tar.xz
(main): Call parse_long_options only if POSIXLY_CORRECT
is *not* set. Reported by Frank T Lofaro.
Diffstat (limited to 'src/yes.c')
-rw-r--r--src/yes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/yes.c b/src/yes.c
index f88a14a10..d73b19389 100644
--- a/src/yes.c
+++ b/src/yes.c
@@ -55,7 +55,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "yes", GNU_PACKAGE, VERSION, usage);
+ /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */
+ if (getenv ("POSIXLY_CORRECT") == NULL)
+ parse_long_options (argc, argv, "yes", GNU_PACKAGE, VERSION, usage);
if (argc == 1)
while (1)