Module Name:    src
Committed By:   christos
Date:           Thu Jan 14 21:26:56 UTC 2010

Modified Files:
        src/tools/compat: compat_defs.h

Log Message:
provide __arraycount for those that don't have it.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/tools/compat/compat_defs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.75 src/tools/compat/compat_defs.h:1.76
--- src/tools/compat/compat_defs.h:1.75	Wed Nov 11 16:53:46 2009
+++ src/tools/compat/compat_defs.h	Thu Jan 14 16:26:56 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.75 2009/11/11 21:53:46 tron Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.76 2010/01/14 21:26:56 christos Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -118,6 +118,9 @@
 #define __restrict
 #undef __unused
 #define __unused
+#ifndef __arraycount
+#define	__arraycount(__x)	(sizeof(__x) / sizeof(__x[0]))
+#endif
 
 /* Dirent support. */
 

Reply via email to