From: Jim Meyering Date: Sat, 18 May 1996 18:37:11 +0000 (+0000) Subject: (main): Don't recognize --help, --h, --he, --version, --v, etc. X-Git-Tag: TEXTUTILS-1_14e~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2191ea8e1b189c83242653fdedf510d4d170be2;p=thirdparty%2Fcoreutils.git (main): Don't recognize --help, --h, --he, --version, --v, etc. if the POSIXLY_CORRECT environment variable is set. --- diff --git a/src/echo.c b/src/echo.c index 7605dc9648..109d2a2f6a 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