Subject: Re: IPv6 code with 64bit arch
To: Paul Newhouse <newhouse@rockhead.com>
From: None <itojun@iijlab.net>
List: tech-net
Date: 07/31/1999 03:22:50
>> I learnt recently that Linux at least as %p in its printk() routine
>>to print pointers. (%08x when sizeof(void*)=32, %016qx when
>>sizeof(void*)=64).
>> I don't know how widespread this is.
>HPUX and SGI support %p for correctly sized pointers.
>I'm pretty sure (it's been a while) that AiX and Motorolo's old SVR4 did
>also.
Just to be sure...
I do not cast pointer to u_long on printing (I agree %p would be
better). Type cast is necessary when, for example, you would like to
handle pointer as plain number like:
if (1 & (u_long)p)
printf("odd address\n");
else
printf("even address\n");
itojun