Author: dim
Date: Sun Mar 10 15:01:06 2013
New Revision: 248131
URL: http://svnweb.freebsd.org/changeset/base/248131

Log:
  MFC r247951:
  
  Make c89(1) invoke /usr/bin/cc with argv[0] also set to /usr/bin/cc,
  similar to what c99(1) does, to prevent "c89: illegal option -- 1"
  messages, when clang is /usr/bin/cc.
  
  Reported by:  tijl

Modified:
  stable/9/usr.bin/c89/c89.c
Directory Properties:
  stable/9/usr.bin/c89/   (props changed)

Modified: stable/9/usr.bin/c89/c89.c
==============================================================================
--- stable/9/usr.bin/c89/c89.c  Sun Mar 10 13:52:19 2013        (r248130)
+++ stable/9/usr.bin/c89/c89.c  Sun Mar 10 15:01:06 2013        (r248131)
@@ -72,7 +72,7 @@ main(int argc, char **argv)
        Argv.a = malloc((argc + 1 + N_ARGS_PREPENDED) * sizeof *Argv.a);
        if (Argv.a == NULL)
                err(1, "malloc");
-       Argv.a[Argc++] = argv[0];
+       Argv.a[Argc++] = CC;
        for (j = 0; j < N_ARGS_PREPENDED; ++j)
                Argv.a[Argc++] = args_prepended[j];
        while ((i = getopt(argc, argv, "cD:EgI:l:L:o:OsU:")) != -1) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to