]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Don't recognize --help, --h, --he, --version, --v, etc.
authorJim Meyering <jim@meyering.net>
Sat, 18 May 1996 18:37:11 +0000 (18:37 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 18 May 1996 18:37:11 +0000 (18:37 +0000)
if the POSIXLY_CORRECT environment variable is set.

src/echo.c

index 7605dc964807564d5ab4c8b381b33eccd6bf8abb..109d2a2f6ab3f6771caff4540b64991638303770 100644 (file)
@@ -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