Re: /proc/interrupts: reformat yes/no?

Alan Cox (alan@lxorguk.ukuu.org.uk)
Wed, 13 Mar 1996 19:04:38 +0000 (GMT)


> Yes, it expands at run-time (haven't got a fail-safe compile-time
> method yet).
>
> Doesn't matter to me what it is based on. Would sizeof( void * )
> be better?

Umm there are hosts with 32bit int, 64 bit pointer (ALPHA)
64bit pointer 32 bit int (Some ultrasparc)
etc..

how about

sizeof union
{
void *ptr;
unsigned long value;
}

Maybe ...

I wouldnt worry too much, whatever you try someone will find an architecture
that screws it up however defensively you plan. Even code like

char ethernet_broadcast[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}

breaks when someone finds a machine with 9bit bytes (yes they still exist too)

You can't win 8)

Alan