Subject: Re: IPv6 code with 64bit arch
To: None <tech-net@netbsd.org>
From: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-net
Date: 07/30/1999 10:55:59
>>>>> "itojun" == itojun  <itojun@iijlab.net> writes:
    itojun> to 8byte boundary by pure luck.  Now we have sockaddr_in6 coming
    itojun> up from the kernel, which makes the reply from the kernel
    itojun> unaligned.  and IPv6-code origin problems: - size_t printing
    itojun> issue. (cast to u_long and print as %ul) - pointer-to-integer
    itojun> cast for boundary checking (cast to int does not work)

  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.

  I suggest that we need to have a general way to extend this further.
  It may just be by doing, e.g:
	printf("size_t is " SIZE_T_PRINTF " you know?", my_size_t_time);

  Any other suggestions?

   :!mcr!:            |  Cow#1: Are you worried about getting Mad Cow Disease?
   Michael Richardson |  Cow#2: No. I'm a duck.
 Home: mcr@sandelman.ottawa.on.ca. PGP key available.