Module Name: src
Committed By: justin
Date: Wed Jul 16 18:58:07 UTC 2014
Modified Files:
src/usr.bin/make: parse.c
Log Message:
Remove an accidental C99-ism in tools which needs to be portable
To generate a diff of this commit:
cvs rdiff -u -r1.196 -r1.197 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.196 src/usr.bin/make/parse.c:1.197
--- src/usr.bin/make/parse.c:1.196 Wed Jul 16 16:52:59 2014
+++ src/usr.bin/make/parse.c Wed Jul 16 18:58:07 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $ */
+/* $NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.196 2014/07/16 16:52:59 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $");
#endif
#endif /* not lint */
#endif
@@ -1963,6 +1963,7 @@ Parse_DoVar(char *line, GNode *ctxt)
static Boolean
ParseMaybeSubMake(const char *cmd)
{
+ size_t i;
static struct {
const char *name;
size_t len;
@@ -1974,7 +1975,7 @@ ParseMaybeSubMake(const char *cmd)
MKV("$(.MAKE)"),
MKV("make"),
};
- for (size_t i = 0; i < __arraycount(vals); i++) {
+ for (i = 0; i < __arraycount(vals); i++) {
char *ptr;
if ((ptr = strstr(cmd, vals[i].name)) == NULL)
continue;