Source-Changes-HG archive

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

[src/trunk]: src/tools/compat provide __arraycount for those that don't have it.



details:   https://anonhg.NetBSD.org/src/rev/a757d3601241
branches:  trunk
changeset: 750798:a757d3601241
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 14 21:26:56 2010 +0000

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

diffstat:

 tools/compat/compat_defs.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 4c2ff310f9d6 -r a757d3601241 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Thu Jan 14 21:25:48 2010 +0000
+++ b/tools/compat/compat_defs.h        Thu Jan 14 21:26:56 2010 +0000
@@ -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. */
 



Home | Main Index | Thread Index | Old Index