Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Unbreak (at least) i386 build .... I have no idea why...
details: https://anonhg.NetBSD.org/src/rev/cda1a24dc5dc
branches: trunk
changeset: 354201:cda1a24dc5dc
user: kre <kre%NetBSD.org@localhost>
date: Wed Jun 07 08:06:22 2017 +0000
description:
Unbreak (at least) i386 build .... I have no idea why this built for me on
amd64 (problem was missing prototype for snprintf witout <stdio.h>)
While here, add some (DEBUG mode only) tracing that proved useful in
solving another problem.
diffstat:
bin/sh/var.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 0d27f2b64364 -r cda1a24dc5dc bin/sh/var.c
--- a/bin/sh/var.c Wed Jun 07 07:06:26 2017 +0000
+++ b/bin/sh/var.c Wed Jun 07 08:06:22 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.57 2017/06/07 05:08:32 kre Exp $ */
+/* $NetBSD: var.c,v 1.58 2017/06/07 08:06:22 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,10 +37,11 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: var.c,v 1.57 2017/06/07 05:08:32 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.58 2017/06/07 08:06:22 kre Exp $");
#endif
#endif /* not lint */
+#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -490,6 +491,7 @@
if ((vp->flags & (VEXPORT|VUNSET)) == VEXPORT)
nenv++;
}
+ CTRACE(DBG_VARS, ("environment: %d vars to export\n", nenv));
ep = env = stalloc((nenv + 1) * sizeof *env);
for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
for (vp = *vpp ; vp ; vp = vp->next)
@@ -498,6 +500,7 @@
*ep++ = (*vp->rfunc)(vp);
else
*ep++ = vp->text;
+ VTRACE(DBG_VARS, ("environment: %s\n", ep[-1]));
}
}
*ep = NULL;
Home |
Main Index |
Thread Index |
Old Index