Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make Avoid use of __arraycount in tools as not portable



details:   https://anonhg.NetBSD.org/src/rev/8b8488bd7506
branches:  trunk
changeset: 797398:8b8488bd7506
user:      justin <justin%NetBSD.org@localhost>
date:      Wed Jul 16 19:31:11 2014 +0000

description:
Avoid use of __arraycount in tools as not portable

diffstat:

 usr.bin/make/parse.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 609a07c997b1 -r 8b8488bd7506 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Wed Jul 16 19:09:53 2014 +0000
+++ b/usr.bin/make/parse.c      Wed Jul 16 19:31:11 2014 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index