summaryrefslogtreecommitdiff
path: root/src/echo.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-05-18 18:37:11 +0000
committerJim Meyering <jim@meyering.net>1996-05-18 18:37:11 +0000
commitb2191ea8e1b189c83242653fdedf510d4d170be2 (patch)
treee4b98b5b3924d76ad6995b5cf8b9eb68b4ed4125 /src/echo.c
parent971c5b13793bcdbae767c434e07a4eb8578fe8cf (diff)
downloadcoreutils-b2191ea8e1b189c83242653fdedf510d4d170be2.tar.xz
(main): Don't recognize --help, --h, --he, --version, --v, etc.
if the POSIXLY_CORRECT environment variable is set.
Diffstat (limited to 'src/echo.c')
-rw-r--r--src/echo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/echo.c b/src/echo.c
index 7605dc964..109d2a2f6 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -109,7 +109,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- parse_long_options (argc, argv, "echo", PACKAGE_VERSION, usage);
+ /* Don't recognize --help or --version if POSIXLY_CORRECT is set. */
+ if (getenv ("POSIXLY_CORRECT") == NULL)
+ parse_long_options (argc, argv, "echo", PACKAGE_VERSION, usage);
/* System V machines already have a /bin/sh with a v9 behaviour. We
use the identical behaviour for these machines so that the