Module Name: src
Committed By: christos
Date: Mon Feb 7 00:26:27 UTC 2011
Modified Files:
src/usr.bin/xlint/lint1: mkops
Log Message:
provide __arraycount() if not there.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/xlint/lint1/mkops
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/xlint/lint1/mkops
diff -u src/usr.bin/xlint/lint1/mkops:1.6 src/usr.bin/xlint/lint1/mkops:1.7
--- src/usr.bin/xlint/lint1/mkops:1.6 Sun Feb 6 18:03:02 2011
+++ src/usr.bin/xlint/lint1/mkops Sun Feb 6 19:26:27 2011
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: mkops,v 1.6 2011/02/06 23:03:02 pooka Exp $
+# $NetBSD: mkops,v 1.7 2011/02/07 00:26:27 christos Exp $
#
# Copyright (c) 2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -67,6 +67,9 @@
printf("#include <sys/types.h>\n");
printf("#include \"op.h\"\n");
printf("#include \"param.h\"\n");
+ printf("#ifndef __arraycount\n");
+ printf("#define __arraycount(a) (sizeof(a) / sizeof(a[0]))\n");
+ printf("#endif /* __arraycount */\n");
printf("mod_t modtab[NOPS];\n");
printf("static const struct {\n");
printf("\tmod_t\tm;\n");