* [parisc-linux] questionable code in glibc sunrpc code?
@ 2002-08-26 0:55 Randolph Chung
2002-08-26 2:50 ` John David Anglin
0 siblings, 1 reply; 2+ messages in thread
From: Randolph Chung @ 2002-08-26 0:55 UTC (permalink / raw)
To: parisc-linux
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [parisc-linux] questionable code in glibc sunrpc code?
2002-08-26 0:55 [parisc-linux] questionable code in glibc sunrpc code? Randolph Chung
@ 2002-08-26 2:50 ` John David Anglin
0 siblings, 0 replies; 2+ messages in thread
From: John David Anglin @ 2002-08-26 2:50 UTC (permalink / raw)
To: randolph; +Cc: parisc-linux
> this code apparently works on other 64-bit archs.... anyone know how?
They may not require strict alignment.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-26 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-26 0:55 [parisc-linux] questionable code in glibc sunrpc code? Randolph Chung
2002-08-26 2:50 ` John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox