Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/file/dist/src Define __arraycount if it doesn't...



details:   https://anonhg.NetBSD.org/src/rev/421754b701f9
branches:  trunk
changeset: 769659:421754b701f9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Sep 17 10:46:52 2011 +0000

description:
Define __arraycount if it doesn't exist.

diffstat:

 external/bsd/file/dist/src/readcdf.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 41a01dd51b46 -r 421754b701f9 external/bsd/file/dist/src/readcdf.c
--- a/external/bsd/file/dist/src/readcdf.c      Sat Sep 17 08:23:36 2011 +0000
+++ b/external/bsd/file/dist/src/readcdf.c      Sat Sep 17 10:46:52 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readcdf.c,v 1.4 2011/09/16 21:06:27 christos Exp $     */
+/*     $NetBSD: readcdf.c,v 1.5 2011/09/17 10:46:52 joerg Exp $        */
 
 /*-
  * Copyright (c) 2008 Christos Zoulas
@@ -31,7 +31,7 @@
 #if 0
 FILE_RCSID("@(#)$File: readcdf.c,v 1.26 2011/08/26 13:38:28 christos Exp $")
 #else
-__RCSID("$NetBSD: readcdf.c,v 1.4 2011/09/16 21:06:27 christos Exp $");
+__RCSID("$NetBSD: readcdf.c,v 1.5 2011/09/17 10:46:52 joerg Exp $");
 #endif
 #endif
 
@@ -44,6 +44,10 @@
 #include "cdf.h"
 #include "magic.h"
 
+#ifndef __arraycount
+#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
+#endif
+
 #define NOTMIME(ms) (((ms)->flags & MAGIC_MIME) == 0)
 
 private int



Home | Main Index | Thread Index | Old Index