aboutsummaryrefslogtreecommitdiffstats
path: root/compat.c
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2013-08-02 05:23:57 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2013-08-02 05:23:57 +0000
commite0f69e1d23f496f590728b9bb0cf0778e4df1210 (patch)
tree9f9944063b4983031d8155b70d2f48d1bc3f290e /compat.c
parent45f33ab2b2f3f9436d40a229bf4ac6dca9411c05 (diff)
downloadsrc-e0f69e1d23f496f590728b9bb0cf0778e4df1210.tar.gz
src-e0f69e1d23f496f590728b9bb0cf0778e4df1210.zip
Import bmake-20130730 - allows folk to supress job tokens.vendor/NetBSD/bmake/20130730
Notes
Notes: svn path=/vendor/NetBSD/bmake/dist/; revision=253879 svn path=/vendor/NetBSD/bmake/20130730/; revision=253880; tag=vendor/NetBSD/bmake/20130730
Diffstat (limited to 'compat.c')
-rw-r--r--compat.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/compat.c b/compat.c
index 8f931cbdc48d..35860485581c 100644
--- a/compat.c
+++ b/compat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */
+/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $");
+__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -332,18 +332,23 @@ again:
* We need to pass the command off to the shell, typically
* because the command contains a "meta" character.
*/
- static const char *shargv[4];
+ static const char *shargv[5];
+ int shargc;
- shargv[0] = shellPath;
+ shargc = 0;
+ shargv[shargc++] = shellPath;
/*
* The following work for any of the builtin shell specs.
*/
+ if (shellErrFlag) {
+ shargv[shargc++] = shellErrFlag;
+ }
if (DEBUG(SHELL))
- shargv[1] = "-xc";
+ shargv[shargc++] = "-xc";
else
- shargv[1] = "-c";
- shargv[2] = cmd;
- shargv[3] = NULL;
+ shargv[shargc++] = "-c";
+ shargv[shargc++] = cmd;
+ shargv[shargc++] = NULL;
av = shargv;
argc = 0;
bp = NULL;