Garrett Wollman wrote:
> 
> Perhaps if name[] had been declared thus:
> 
> #define       INTTYPE_NCHARS(t) ((sizeof(t) * 3 * CHAR_BIT + 7) / 8)
> 
>       char name[(sizeof "ipfw: ") + INTTYPE_NCHARS(int)];

Or alternatively (removing a bit more magic):

#include <sys/types.h>

#define INTTYPE_NCHARS(t)   (howmany (sizeof(t) * 3 * CHAR_BIT, 8))

The macro howmany() is quite useful. It is also in <sys/param.h>

Mike Kennett
([EMAIL PROTECTED])



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to