[parisc-linux] questionable code in glibc sunrpc code?
Randolph Chung
Randolph Chung <randolph@tausq.org>
Sun, 25 Aug 2002 17:55:57 -0700
glibc's sunrpc/clnt_tcp.c contains code like this:
*(u_long *)(ct->ct_mcall + 3 * BYTES_PER_XDR_UNIT)
= htonl(*(u_long *)info);
ct->ct_mcall is a char[] array that's after a struct,
BYTES_PER_XDR_UNIT is 4
if sizeof(u_long) is 8, then this is an unaligned access... (gcc notices
and complains loudly :-)
this code apparently works on other 64-bit archs.... anyone know how?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/