Module Name: src
Committed By: justin
Date: Wed Jul 16 19:31:11 UTC 2014
Modified Files:
src/usr.bin/make: parse.c
Log Message:
Avoid use of __arraycount in tools as not portable
To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 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.197 src/usr.bin/make/parse.c:1.198
--- src/usr.bin/make/parse.c:1.197 Wed Jul 16 18:58:07 2014
+++ src/usr.bin/make/parse.c Wed Jul 16 19:31:11 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $ */
+/* $NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 justin Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.197 2014/07/16 18:58:07 justin Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 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.197 2014/07/16 18:58:07 justin Exp $");
+__RCSID("$NetBSD: parse.c,v 1.198 2014/07/16 19:31:11 justin Exp $");
#endif
#endif /* not lint */
#endif
@@ -1975,7 +1975,7 @@ ParseMaybeSubMake(const char *cmd)
MKV("$(.MAKE)"),
MKV("make"),
};
- for (i = 0; i < __arraycount(vals); i++) {
+ for (i = 0; i < sizeof(vals)/sizeof(vals[0]); i++) {
char *ptr;
if ((ptr = strstr(cmd, vals[i].name)) == NULL)
continue;