Module Name: src
Committed By: sjg
Date: Sat Mar 11 23:59:02 UTC 2017
Modified Files:
src/usr.bin/make: main.c
Log Message:
Do not consider using -C arg "as is" for .CURDIR unless it starts with '/'.
Reviewed by: christos
To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.257 src/usr.bin/make/main.c:1.258
--- src/usr.bin/make/main.c:1.257 Wed Feb 8 17:47:36 2017
+++ src/usr.bin/make/main.c Sat Mar 11 23:59:02 2017
@@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#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 @@ rearg:
(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)