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