Current-Users archive

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

Re: building lint as a host tool on MacOS (Snow Leopard) and Solaris fails



On Thu, 14 Jan 2010, Paul Goyette wrote:
> Hmmm...  __arraycount() is a macro, not a real function.  Defined in
> /usr/include/sys/cdefs.h
> 
> It probably should not be used in host tools...

I think it should just be defined in src/tools/compat/compat_def.h,
as in the appended patch.

--apb (Alan Barrett)

Index: tools/compat/compat_defs.h
===================================================================
--- tools/compat/compat_defs.h  11 Nov 2009 21:53:46 -0000      1.75
+++ tools/compat/compat_defs.h  14 Jan 2010 21:29:08 -0000
@@ -118,6 +118,7 @@ struct group;
 #define __restrict
 #undef __unused
 #define __unused
+#define        __arraycount(__x)       (sizeof(__x) / sizeof(__x[0]))
 
 /* Dirent support. */
 


Home | Main Index | Thread Index | Old Index