Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Do not consider using -C arg "as is" for .CURDI...



details:   https://anonhg.NetBSD.org/src/rev/24d1a9ce927b
branches:  trunk
changeset: 822297:24d1a9ce927b
user:      sjg <sjg%NetBSD.org@localhost>
date:      Sat Mar 11 23:59:02 2017 +0000

description:
Do not consider using -C arg "as is" for .CURDIR unless it starts with '/'.

Reviewed by: christos

diffstat:

 usr.bin/make/main.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r e14f6ac753b6 -r 24d1a9ce927b usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sat Mar 11 23:39:49 2017 +0000
+++ b/usr.bin/make/main.c       Sat Mar 11 23:59:02 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $      */
+/*     $NetBSD: main.c,v 1.258 2017/03/11 23:59:02 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.258 2017/03/11 23:59:02 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.257 2017/02/08 17:47:36 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.258 2017/03/11 23:59:02 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -445,7 +445,8 @@
                                (void)fprintf(stderr, "%s: %s.\n", progname, strerror(errno));
                                exit(2);
                        }
-                       if (stat(argvalue, &sa) != -1 &&
+                       if (argvalue[0] == '/' &&
+                           stat(argvalue, &sa) != -1 &&
                            stat(curdir, &sb) != -1 &&
                            sa.st_ino == sb.st_ino &&
                            sa.st_dev == sb.st_dev)



Home | Main Index | Thread Index | Old Index